Re: [sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-12 Thread Keith Medcalf
to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On >Behalf Of Dominique Devienne >Sent: Tuesday, 10 September, 2019 02:36 >To: General Discussion of SQLite Database us...@mailinglists.sqlite.org> >Subject: [sqlite] Why aren&

Re: [sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-10 Thread Dominique Devienne
On Tue, Sep 10, 2019 at 4:35 PM Igor Tandetnik wrote: > On 9/10/2019 7:05 AM, Keith Medcalf wrote: > > select value, > > round((julianday(value) - julianday('00:00:00')) * 86400.0, 3) > >from test; > > Another possibility: strftime('%s', '1970-01-01 ' || value) > I ended up needing %

Re: [sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-10 Thread Igor Tandetnik
On 9/10/2019 7:05 AM, Keith Medcalf wrote: select value, round((julianday(value) - julianday('00:00:00')) * 86400.0, 3) from test; Another possibility: strftime('%s', '1970-01-01 ' || value) -- Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-10 Thread Dominique Devienne
On Tue, Sep 10, 2019 at 1:05 PM Keith Medcalf wrote: > insert into test values ('00:00:07.86'); > select value, >round((julianday(value) - julianday('00:00:00')) * 86400.0, 3) > from test; > Thanks! As I guessed, I was indeed missing something. But IMHO that something is definitely not

Re: [sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-10 Thread Keith Medcalf
ate if you do not provide that part is 2000-01-01 -- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users On Behalf >Of Dominique Devienne >Sent: Tuesday, 10 Septembe

[sqlite] Why aren't there date/time parsing built-in functions in SQLite

2019-09-10 Thread Dominique Devienne
Hi, There are functions to format numbers as text times and/or dates, but I can't find equivalent ones to parse those text times/dates back to numbers. I wanted to sum durations expressed as HH:MM:SS.SS strings, and I was expecting a function parsing such a string into a number of seconds for exa