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.

Solved Solved
0 5 1,996
1 ACCEPTED SOLUTION

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!

View solution in original post

5 REPLIES 5

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.

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!

Great! This helped me a lot to improve my app😎

ranorga, eres un master, muchas gracias. 

no puedo creer que google/apsheet, no tenga una función para medir el número de dias entre dos fechas. Muchas gracias por aportación. 

muchas gracias por tu aportación, 

HOUR([FechaTurno]-DATE(“1/1/1900”))/24+2

funciona perfecto!!!

Top Labels in this Space