How to change Time value to Decimal value or to Number value

Hello everyone,
I would like to change Time value to Decimal value or to Number value, like the DATEVALUE() or the TIMEVALUE() of the Google spread sheet.

https://support.google.com/docs/answer/3267350?hl=en-GB
https://support.google.com/docs/answer/3093039?hl=en-GB

What do you think I should do with Appsheet?

Solved Solved
0 2 182
1 ACCEPTED SOLUTION

For time value please try the following expression in a decimal type column with 5 decimal places or as many decimal places you want.

TOTALHOURS(TEXT([Time in]))/TOTALHOURS("23:59:59.90")

or even simply TOTALHOURS(TEXT([Time in]))/24.00000  will do.

Where [Time In] is a time type column. If you are looking for something else, please give examples of input time value and expected output value that you are expecting.

For date value also, you may wish to give your requirement more clearly with some examples.

 

https://help.appsheet.com/en/articles/3543771-totalhours

Edit: Added a more compact expression.

View solution in original post

2 REPLIES 2

For time value please try the following expression in a decimal type column with 5 decimal places or as many decimal places you want.

TOTALHOURS(TEXT([Time in]))/TOTALHOURS("23:59:59.90")

or even simply TOTALHOURS(TEXT([Time in]))/24.00000  will do.

Where [Time In] is a time type column. If you are looking for something else, please give examples of input time value and expected output value that you are expecting.

For date value also, you may wish to give your requirement more clearly with some examples.

 

https://help.appsheet.com/en/articles/3543771-totalhours

Edit: Added a more compact expression.

Thank you for your suggestions @Suvrutt_Gurjar , I will try them with my appsheet!