Thanks. This is what I had to do as also pointed out by Martin Schnabel:
https://play.golang.org/p/cC3yJ2AWquk

On Thu, Feb 7, 2019 at 7:10 PM Burak Serdar <bser...@ieee.org> wrote:

> On Thu, Feb 7, 2019 at 2:28 PM Rajanikanth Jammalamadaka
> <rajanika...@gmail.com> 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 golang-nuts+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>


-- 
Rajanikanth

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to