Default Date Value Not working

I’m trying to populate a DateAdded field to my Members table.

Firstly, it’s confusing that there is a default value in the table and on the form. Not clear if I need to put the default value in both places or not.

Secondly, I tried putting it in both places, and used =five.now() as the formula. The field itself is defined as Date, not DateTime. I added a record, and in the DateAdded field, it says 2024-03-06. So far so good. But when I save the new record, I get an error saying “Data integrity check - data:type mismatch
Field (DateAdded) has invalid value
Not a valid date formatted string”

Why is that not a valid date? Thanks…

Hi RMittleman,

The now() function needs to be stored with a data type of TimeStamp as it returns the current date and time in UTC as a string. You can display it in your application as Date, but at the table-level it needs to be TimeStamp. This is why you are receiving the error. You may find this link helpful.

Table-level should always take precedence over the form-level and you should not need to repeat your default value at the form-level, however, I tested this for you using =five.now(), and it seems that it is only working at the form-level, thanks for bringing this to our attention and I will pass it onto our QA team.

1 Like