On 1/17/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> "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.

right, because to compute the "real" difference is tricky as you have
already pointed out... until someone mandates a 100 day, 10 months
year, a 10 hour day, and so on.

> It computes the number of date measurement
> interval transitions that occur between the two dates.

in other words, the function provides the rope along with mandatory
warnings, and if the user/developer still wishes to hang him/herself,
well, so be it.


>
> >
> > -----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]
> -----------------------------------------------------------------------------
>
>


-- 
Puneet Kishor http://punkish.eidesis.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Open Source Geospatial Foundation (OSGeo) http://www.osgeo.org/

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to