RE: [sqlite] time calculations

2004-03-02 Thread Williams, Ken
> -Original Message- > From: Griggs, Donald [mailto:[EMAIL PROTECTED] > Sent: Monday, March 01, 2004 11:14 PM > > > I would think a general database program would do as sqlite > does -- call the > carefully written, standard posix routines (or their PC or > MAC analogues), > and massa

RE: [sqlite] time calculations

2004-03-01 Thread Griggs, Donald
(Shoot! My previous email was another sent before it was quite ready. My apologies to all.) -regarding specialized needs for date/time calculations: An alternative (but way overkill for sqlite, right?) is to use specialized software to keep atomic time (TAI), or it's cousin, the GPS epoch time,

RE: [sqlite] time calculations

2004-03-01 Thread Griggs, Donald
Hi Ken, Regarding: " But the events can take place in any setting whatsoever. For instance, if the events represent some sort of timing for stock trades, or ..., then the database host's internal clock has no relevance." You're absolutely right. Regarding: "(Here I'm assuming that SQLite d

RE: [sqlite] time calculations

2004-03-01 Thread Williams, Ken
Hi Donald, > From: Griggs, Donald [mailto:[EMAIL PROTECTED] > Sent: Monday, March 01, 2004 10:46 AM > >I suppose that for a system to really care about a leap > second jump, it > would have to be at least reasonably synched to the NIST clocks as a > precondition -- otherwise the normal compu

RE: [sqlite] time calculations

2004-03-01 Thread Griggs, Donald
In "after-pressing-SEND hindsight:" I suppose that for a system to really care about a leap second jump, it would have to be at least reasonably synched to the NIST clocks as a precondition -- otherwise the normal computer clock drift would mean that the clock is off by multiple seconds routin

RE: [sqlite] time calculations

2004-03-01 Thread Griggs, Donald
From: Williams, Ken [mailto:[EMAIL PROTECTED] That sounds convenient but potentially dangerous - does it understand leap years/seconds, for example? And various other pitfalls of date/time math? Regarding leap *years*, I agree that it should account for the

RE: [sqlite] time calculations

2004-03-01 Thread Williams, Ken
> -Original Message- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Saturday, February 28, 2004 6:57 PM > To: [EMAIL PROTECTED] > Subject: Re: [sqlite] time calculations > > > I also added the ability to put a time value in as the > modifier and sh

Re: [sqlite] time calculations

2004-02-28 Thread D. Richard Hipp
Lloyd thomas wrote: > Will there be a simple way to update SQLite in PHP on a windows platform so > that I can use the new date/time functions? > You'll have to ask the PHP people about that. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 --

Re: [sqlite] time calculations

2004-02-28 Thread Lloyd thomas
Lloyd - Original Message - From: "D. Richard Hipp" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 29, 2004 12:57 AM Subject: Re: [sqlite] time calculations > Lloyd thomas wrote: > > I have a table that shows a list of connections sho

Re: [sqlite] time calculations

2004-02-28 Thread D. Richard Hipp
Lloyd thomas wrote: I have a table that shows a list of connections showing the time the connection was finished and the duration. I wish to show concurrent connections during a particular minute. for instance the following would show that there was two connections during 2003-12-04 09:27:00 --

Re: [sqlite] time calculations

2004-02-28 Thread Lloyd thomas
-12-04 09:28:00 | 00:04:19 > - > > - Original Message - > From: "Kurt Welgehausen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, February 28, 2004 9:26 PM > Subject: Re: [sqlite] time calcu

Re: [sqlite] time calculations

2004-02-28 Thread Lloyd thomas
;Kurt Welgehausen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, February 28, 2004 9:26 PM Subject: Re: [sqlite] time calculations > >> it relies on having the seconds as well. > > I don't understand the question. As far as I know, > nothing in SQ

Re: [sqlite] time calculations

2004-02-28 Thread Kurt Welgehausen
>> it relies on having the seconds as well. I don't understand the question. As far as I know, nothing in SQLite requires the seconds. sqlite> select julianday('2003-12-04 16:41'); julianday('2003-12-04 16:41') - 2452978.19513889 If you're getting an err

Re: [sqlite] time calculations

2004-02-28 Thread Lloyd thomas
- Original Message - From: "Lloyd thomas" <[EMAIL PROTECTED]> To: "Kurt Welgehausen" <[EMAIL PROTECTED]> Sent: Saturday, February 28, 2004 8:34 PM Subject: Re: [sqlite] time calculations > Thanks Kurt, > Nearly there, but not quit

Re: [sqlite] time calculations

2004-02-28 Thread Kurt Welgehausen
>> SELECT TIME_TO_SEC(duration)as duration >> FROM call_data where call_time <= '2003-12-04 16:41' >> AND DATE_SUB('2003-12-04 16:41', INTERVAL duration HOUR_SECOND) <= call_time Try SELECT round((julianday(duration)-julianday('00:00:00')) * 86400) as duration FROM call_data where call_time <