General information
Category:
Coding, syntax & commands
Hi all,
Does anyone have the formula to convert a Timestamp column into a actual datetime value? I seem to have nuked a setting in a class and I am trying to figure out how far back in backups to go to figure out the setting.
Thanks,
*****
* Example
? UnixTime2Datetime(1579737301.704)
? UnixTime2Datetime(1416003979)
? Datetime2UnixTime(DATETIME())
? Datetime2UnixTime(DATETIME(2014,11,14,10,26,19))
* Convert Unix time to datetime
FUNCTION UnixTime2Datetime(tnUnixTime)
RETURN {^1970/01/01 00:00:00} + tnUnixTime
* Convert datetime to Unix time
FUNCTION Datetime2UnixTime(ttDT)
RETURN ttDT - {^1970/01/01 00:00:00}
Frank
******
Albert,
Somebody had share that function with me. I think it will give you a starting point.
Frank
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only