Remove - or / from date

I tried using inline formatting with this.gsub(/[-]/,’’) to remove the “-” from a date generated with the Date type and I received an error saying "error: Could not access blank value: Use || to provide a default value for blank fields. Example: (my_field || 0) + 1":

I think you need a backslash in front of the dash. A dash in brackets indicates a range so it needs to be escaped.

Unless I misunderstood, this didn’t seem to work. I’m actually using the same exact formula in-line with the SSN type and it works beautifully. The error I am getting referrs to accessing a blank value. The same error is returned for upper(this) when using it in-line with the date type.

Ah, sorry, you need to convert dates to strings first. So the following should work:

upper(this.to_s)

this.to_s.gsub(/[-]/,'')

I need to improve that error message - it comes up even when the cause is not a blank value.

Perfect. Thanks for the help!