[Phpwm] days_between()

Peter Measham pmeasham at dsl.pipex.com
Thu Jun 7 18:43:29 BST 2007


On 6/7/07, David Goodwin <david at codepoets.co.uk> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Peter Measham wrote:
> > This is also something built-in to later versions of mysql:
> >
> > http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timediff
> >
>
> Does that check the validity of day/month/year values?
>
> (The docs don't seem to say)
>
> David.
> - --
> David Goodwin
>
> [ david at codepoets dot co dot uk ]
> [ http://www.codepoets.co.uk       ]


Say if you run a statement like:

SELECT `created` , `modified` , TIMEDIFF( `modified` , 'bad data' ) AS timediff
FROM `posts`

The resulting timediff column would be populated with null.

Peter



More information about the Phpwm mailing list