Convert digits to Date and visa versa

How do I Convert digits to Date and visa versa?

Assistance would be appreciated.

Regards

@viaan

To convert a date to a sequential number like found in Excel and Google Sheets you can use the undocumented function DATEVALUE()
Example: DATEVALUE(“2021/11/15”) => 44516

When dealing with column values or NOW/TODAY, use an inner FORMAT_DATE() to eliminate time zone issues.
Example: DATEVALUE(FORMAT_DATE({Date}))

For dates AFTER February 28, 1900, you can convert back to a date by using the ADD_DAYS() function from December 31, 1899.

Example: ADD_DAYS(“1899-12-31”, DATEVALUE(FORMAT_DATE({Date})) – 1.0001)
(The “.0001” is to deal with internal calculation issues.)


Jim - The Monday Man (YouTube Channel)
What is Make & How can it help you?
Schedule a 1-on-1 Tutorial Session

Hi

Thank you. Much appreciated

Regards

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.