Go has methods to extract almost every component of a timestamp, eg time.Second()
, time.Nano()
, but none to extract the millisecond portion of a timestamp.
How does one extract the millisecond value of a timestamp.
eg, in the case of a timestamp like:
2021-01-07 10:33:06.511
i want to extract 511
time.Millisecond
constant value insted of1000_000
. It is more explicit