Re: [sqlite] Subject: Re: SQL Date Import

2018-06-03 Thread dmp
> SQLite doesn't have a DATE type. You can store dates in a SQLite > database as text, or integers or floating point numbers (e.g. "20180602", > a number of days, a number of seconds). But when you ask for a value, > that's what you'll get back. Any interpretation of that value as a > date is

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-03 Thread Jean-Christophe Deschamps
The problem not having a DATETIME field is, however, very simple: When reading a foreign database which stores date values as a number, I have to guess on how to get back the correct date. The datatype used is irrelevant w.r.t. this issue. Unless fully qualified with convention used and

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-03 Thread Simon Slavin
On 3 Jun 2018, at 9:48am, Thomas Kurz wrote: > he problem not having a DATETIME field is, however, very simple: When reading > a foreign database which stores date values as a number, I have to guess on > how to get back the correct date. People and companies are very creative in > that

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-03 Thread Thomas Kurz
> One problem with having an actual internal date format is how to dump it into > a text file or to a text interface. You end up turning it into a number or a > string anyway, so you might was well store it that way. The problem not having a DATETIME field is, however, very simple: When

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-02 Thread Simon Slavin
On 2 Jun 2018, at 8:55pm, Thomas Kurz wrote: > Are there any plans to implement a DATETIME and/or TIMESTAMP field types? No. SQLite has many routines which understand standard ways of storing datestamps: So you can store IS0-8601-format strings, unix

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-02 Thread Abroży Nieprzełoży
> Are there any plans to implement a DATETIME and/or TIMESTAMP field types? I don't think so. The SQLite team really cares about backward compatibility. You can store timestamp as a unixepoch integer or as a text in format supported by date/time functions.

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-02 Thread Thomas Kurz
Are there any plans to implement a DATETIME and/or TIMESTAMP field types? - Original Message - From: Simon Slavin To: SQLite mailing list Sent: Saturday, June 2, 2018, 21:04:10 Subject: [sqlite] Subject: Re: SQL Date Import On 2 Jun 2018, at 7:32pm, dmp wrote: > By the way, most

Re: [sqlite] Subject: Re: SQL Date Import

2018-06-02 Thread Simon Slavin
On 2 Jun 2018, at 7:32pm, dmp wrote: > By the way, most databases give exactly that INSERT when dumping data > for DATE, TIME, TIMESTAMP, etc., text. I'm not advocating a preferred > type for storage here. I think your proposed programme of experimentation is the right way to pursue this. But