4 ms·
> I store all my dates in sql as text in iso format so I can easily sort them Strong SQLite vibes... (SQLite doesn't have a date format, it has builtin functio
by pcr910303 6y ago
> I store all my dates in sql as text in iso format so I can easily sort them
Strong SQLite vibes... (SQLite doesn't have a date format, it has builtin functions that accept ISO format text or unix timestamps)
- calvinmorrison 6y agoAs a Unix person, aren't dates just number? Why is sort complex? Just parse input and render timestamps
- adrianN 6y agoTime zone information makes this a bit tricky.
- yen223 6y agoIt's pretty miserable when you're trying to look up a date, and all you get are numbers that requires a conversion step to be readable.
- drchickensalad 6y agoAssuming by number you mean epoch seconds/milliseconds, a number can store the instant in time, but not a TIMEZONE. Obviously you could do bit magic if you shift it over (so you don't mess up sorting), but that's true for any data and a sufficiently large number type.
- zikzak 6y agoThat's a good point. We were talking MS SQL but yes, that would make way more sense.