dateparse
dateparse copied to clipboard
Yet another crazy format
A followup on #30 for excel.
43161.0: 2 March 2018
43186.0: 27 March 2018
Is that 43161.0
a different column or part of the actual date format?
Actual date format.
It should be how excel stores date internally: number of days (24h) passed since its start 1899-12-30 00:00:00 UTC
.
sorry been slow to do this one, just can't seem to come to grips with adding it to core lib, do you think its fair to say that this is reasonable/appropriate way to handle? If so i think I will close this.
dateStr := "43161.0: 2 March 2018"
parts := strings.Split(dateStr,": ")
t, err := dateparse.ParseAny(strings.TrimSpace(parts[1]))
Sorry being not clear.
I wrote it like 43161.0: 2 March 2018
to signal result. The string I encountered is only 43161.0
so dateparse.ParseAny("43161.0")
sounds reasonable to me.
Any idea if the 43161.0
always has 1 digit after decimal place?
Our data is working with dates so I have always seen with 1 digit but I guess technically it could be more to specify time.