Is there a built-in way of getting the Unix timestamp in kdb/q?
Something like
`float$.z.p
would be ideal; otherwise I'll have to resort to a more laborious implementation where I count the seconds from Jan 1 1970.
q)`long$.z.p
458558447196132000
q)`long$1970.01.01D00:00
-946684800000000000
So you can get nanos from 2000.01.01. From there it's a simple calculation to convert to and from a 2000.01.01-based epoch vs 1970.01.01 based epoch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With