Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have a field with timestamp data in a Sense app ( hh:mm:ss.)
How can do to change this from e.g '73:58:54' to '73' ?
01:54:43 |
01:55:47 |
73:58:54 |
289:34:52 |
361:05:27 |
Timestamps are actually numbers at the back end. That is how you see a timestamp value is different as a number at the back end. For example, if you see timestamp as 1:00:00 (hh:mm:ss) format is actually a fraction and is 1/24. Also this is also possible that it could be n+1/24,( where n is an integer) when you just try to format and show time part from a date+timestamp value.
Hence, it would be imperative to understand what exactly you are going to perform with the value '73' from '73:58:54'. Because 73 could be shown as 73 a time (actually a fraction) could also be shown as 73 (actually the integer 73) - ways are there. Therefore, let know what-next (if any) to do with this '73' or just showing '73' is fine.
For just showing : Interval(Timestamp#( '73:58:54', 'hh:mm:ss'), 'hh')
For performing operation next on it (like 73+1=4) : SubField('73:58:54', ':',1)
hi,
you can use
hour(time field) as hour
Timestamps are actually numbers at the back end. That is how you see a timestamp value is different as a number at the back end. For example, if you see timestamp as 1:00:00 (hh:mm:ss) format is actually a fraction and is 1/24. Also this is also possible that it could be n+1/24,( where n is an integer) when you just try to format and show time part from a date+timestamp value.
Hence, it would be imperative to understand what exactly you are going to perform with the value '73' from '73:58:54'. Because 73 could be shown as 73 a time (actually a fraction) could also be shown as 73 (actually the integer 73) - ways are there. Therefore, let know what-next (if any) to do with this '73' or just showing '73' is fine.
For just showing : Interval(Timestamp#( '73:58:54', 'hh:mm:ss'), 'hh')
For performing operation next on it (like 73+1=4) : SubField('73:58:54', ':',1)