#Parse dates correctly
17 messages · Page 1 of 1 (latest)
someone deleted?
strings.Split
strconv.Atoi
(fmt.Sprintf)
time.Date/time.Parse/time.ParseInLocation
got it, thank you
time.Time.Format
for formating tobthe desired layout
tho Go time layouts are somewhat tricky, because they expect you to use a concrete date and time to be used for defining the layout string
a specific date and time
the dates in these constant values are the ones you need to use.
like 06 for YY
2006 for YYYY
2 for D
02 for DD
1 for M
01 for MM
and the same with hours, minutes, seconds
"2006/2/1" would be a format string for your layout above
the input has different formats