Save it as a string, then access the slice parts of the string:

d := datestringtoparse
YY := d[0:2]
MM := d[2:4]

and so forth.

On Thursday, February 7, 2019 at 2:28:30 PM UTC-7, Rajanikanth 
Jammalamadaka wrote:
>
> How can I parse the following timestamp in Go?
>
> date +%y%m%d%H%M%S%N
>
> 190207202017034235995
>
>
> 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.

Reply via email to