Convert date to number

Dear Community:

In Excel there is the DATEVALUE formula that converts a date into a number. For example DATEVALUE (“1/1/2008”) returns 39448.
Is there a similar formula in AppSheet?

Thanks in advance.

I think in your analogy you should remember that Excel’s Datevalue function is based on the fact of an arbitrary start date of January 1, 1900.

To simulate something similar you could introduce a virtual column [DateValue] with an expression:

[YourActualDateColumn] - DATE("1/1/1900")

That should ideally give you the same result.

2 Likes

Thanks a lot @Markus_Malessa. Finally, I had to rewrite the expression you suggested to get the same result as the Google DATEVALUE formula:
HOUR([FechaTurno]-DATE(“1/1/1900”))/24+2

Thanks!

3 Likes