How to convert current date and time to Unix epoch time?
The Caché epoch is January 1, 1840 and the Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 . How do you convert the current date and time to Unix epoch time?
Discussion (3)0
Comments
USER>w $ZDATETIME($h,3)
2020-02-08 00:59:59
USER>w $ZDATETIME($h,-2)
1581120005
docs: https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzdatetime
How can we convert unix time stamp to date (dd mon yyyy) for example epochtime. = 572486400 and i want to convert it to 22 Feb 1988?
There are also some Epoch conversion methods in the %Library.UTC class.