Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Hard Coded Dates

Topic Labels: Formulas
539 2
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to use hard coded dates in a date calculation e.g. Date Diff(1/1/2019,Today()). I can get the right calculation if both dates are in fields but the moment put in a hard coded date it doesn’t work. Any ideas?

2 Replies 2

Welcome to the community, @Claremont_Scouts! :grinning_face_with_big_eyes: To use a literal date, you have to parse a text version of the date with DATETIME_PARSE(), which creates a datetime object to use for comparison:

DATETIME_DIFF(DATETIME_PARSE("1/1/2019"), TODAY())

Thanks. I figured this out after a bit… Nice to know I got it right and didn’t do some clumsy workaround.