Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-08 Thread Ben Asher
Thanks all! Super helpful. Ben On Wed, Feb 6, 2019 at 11:55 AM Ben Asher wrote: > Hi there! We're having a debate at my company about date storage in > SQLite. SQLite has builtin support for ISO8601 in its date functions, so > some folks have started storing dates as ISO8601 SQLite-compatible

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Keith Medcalf
On Wednesday, 6 February, 2019 12:55, Ben Asher wrote: > Hi there! We're having a debate at my company about date storage in > SQLite. SQLite has builtin support for ISO8601 in its date functions, > so some folks have started storing dates as ISO8601 SQLite-compatible > date strings. > Are

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Jens Alfke
> On Feb 6, 2019, at 2:21 PM, J Decker wrote: > > From a JS point of view new Date( ISOString )and .toISOString() are quick > and available…. Available, yes, but expensive (compared to using a number.) > ISO format parsing is NOT that hard it's just a minor varient of > parsing floats.

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread J Decker
From a JS point of view new Date( ISOString )and .toISOString() are quick and available ISO format parsing is NOT that hard it's just a minor varient of parsing floats. (maybe the conversion from parts into numeric?) Haven't bothered to benchmark it. Date Diffs easily avaialble. On Wed,

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Jens Alfke
> On Feb 6, 2019, at 11:55 AM, Ben Asher wrote: > > Hi there! We're having a debate at my company about date storage in SQLite. > SQLite has builtin support for ISO8601 in its date functions, so some folks > have started storing dates as ISO8601 SQLite-compatible date strings. Are > there

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Andy Bennett
Hi, Integer unix timestamps are only accurate to one second, where ISO8601 (at least as implemented by SQLite) can go to 1 millisecond. Also you have to know the epoch to interpret a unix timestamp - not everybody uses 1970-01-01 00:00:00. Will people be able to figure out what the field

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Dennis Clarke
On 2/6/19 9:10 PM, Richard Hipp wrote: On 2/6/19, Ben Asher wrote: Hi there! We're having a debate at my company about date storage in SQLite. SQLite has builtin support for ISO8601 in its date functions, so some folks have started storing dates as ISO8601 SQLite-compatible date strings. Are

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Richard Hipp
On 2/6/19, Ben Asher wrote: > Hi there! We're having a debate at my company about date storage in SQLite. > SQLite has builtin support for ISO8601 in its date functions, so some folks > have started storing dates as ISO8601 SQLite-compatible date strings. Are > there pitfalls to storing dates

Re: [sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Dennis Clarke
On 2/6/19 7:55 PM, Ben Asher wrote: Hi there! We're having a debate at my company about date storage in SQLite. SQLite has builtin support for ISO8601 in its date functions, so some folks have started storing dates as ISO8601 SQLite-compatible date strings. Are there pitfalls to storing dates

[sqlite] ISO8601 vs Numeric Timestamp for Date Storage

2019-02-06 Thread Ben Asher
Hi there! We're having a debate at my company about date storage in SQLite. SQLite has builtin support for ISO8601 in its date functions, so some folks have started storing dates as ISO8601 SQLite-compatible date strings. Are there pitfalls to storing dates this way compared to a unix timestamp?