-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
string of format "YYYY-MM-DD hh:mm" not recognized as DATETIME #11
Comments
The DATETIME function and other time related functions convert only some forms of strings by default.
Placeholders are the same as used in the DATETIME_FORMAT function. |
oh ... did not notice you can add datetime formats to the parser will this also work if two or more different formats are used in the dataset ? can multiple format specs added to |
btw ... cheers for such a nice lib 👍 |
just for your understanding i was comparing csvq funtionality to the sqlite ones sqlite has support for 12 different formats by default https://www.sqlite.org/lang_datefunc.html#time_values c. |
Multiple formats can be added by executing multiple |
looks like i am wrong in this repo, then csvq repo would be more proper ... anyway: in on line 85 from: if t, e := time.ParseInLocation("2006-01-02T15:04:05.999999999", s, location); e == nil {
return t, true
} to: if t, e := time.ParseInLocation("2006-01-02T15:04:05.999999999", s, location); e == nil {
return t, true
} else if t, e := time.ParseInLocation("2006-01-02T15:04:05", s, location); e == nil {
return t, true
} else if t, e := time.ParseInLocation("2006-01-02T15:04", s, location); e == nil {
return t, true
} and on line 90 from: if t, e := time.ParseInLocation("2006-01-02 15:04:05.999999999", s, location); e == nil {
return t, true
} to: if t, e := time.ParseInLocation("2006-01-02 15:04:05.999999999", s, location); e == nil {
return t, true
} else if t, e := time.ParseInLocation("2006-01-02 15:04:05", s, location); e == nil {
return t, true
} else if t, e := time.ParseInLocation("2006-01-02 15:04", s, location); e == nil {
return t, true
} |
the query yields an empty string:
but this works
The text was updated successfully, but these errors were encountered: