Hi everyone,
I need to convert dates and times that are in epoch format to milliseconds as normal date and time.
ex: 1628231654073 ==> Friday, August 6, 2021 06:34:14.073
I can't find how to do this conversion.
Does anyone know how to do it?
Bruno C
If all you need is local or UTC then you can do something like this.
import std/times
var t = fromUnix(convert(Milliseconds, Seconds, 1628231654073))
echo t
echo t.utc()
The docs for times are here .