On Thu, Feb 7, 2019 at 2:28 PM Rajanikanth Jammalamadaka
<[email protected]> wrote:
>
> How can I parse the following timestamp in Go?
>
> date +%y%m%d%H%M%S%N
>
> 190207202017034235995
for the ymdHMS part, you can use:
time.Parse("060102150405",str[:12])
I don't know if time parser has something for the %N, you might need
to do it manually, line strconv.Atoi(str[12:])
>
>
> Thanks,
>
> Raj
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.