"Fowler, Jeff" <[EMAIL PROTECTED]> wrote: > Remember gang, if you want to know how many seconds are between two > timestamps, you wouldn't ask for a difference in months. You'd say > something like DATEDIFF(seconds, t1, t2). >
So DATEDIFF doesn't really compute the difference between two dates. It computes the number of date measurement interval transitions that occur between the two dates. > > -----Original Message----- > From: Markus Hoenicka [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 17, 2008 3:47 PM > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] Date arithmetic question > > [EMAIL PROTECTED] writes: > > So datediff('month', '2008-02-01 23:59:59','2008-01-31 00:00:00') > should > return 1 even though the difference is really only 1 second? > Seems > goofy to me.... > > > > well, this is one second rounded up to the next full month...If that is > the kind of information you want to compute, it's probably not that > goofy after all. > > regards, > Markus > > -- > Markus Hoenicka > [EMAIL PROTECTED] > (Spam-protected email: replace the quadrupeds with "mhoenicka") > http://www.mhoenicka.de > > > ------------------------------------------------------------------------ > ----- > To unsubscribe, send email to [EMAIL PROTECTED] > ------------------------------------------------------------------------ > ----- > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > > > . ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------