Anders Callertun wrote:
>
> >>SELECT FLOOR((TO_DAYS("1999-7-24")-TO_DAYS("1972-1-1"))/365.25);
> >SELECT FLOOR((TO_DAYS("1999-7-26")-TO_DAYS("1998-7-26"))/365.25);
> >0
> >
> >Not really correct. How about implementing a proper AGE() function into mySQL
> >by TCX ?
>
> How about a DATE_DIFF(date1,date2,expr type) as a cross between PERIOD_DIFF()
> and DATE_SUB()? Beeing used to Sybase's only five, but very flexible date
> functions, MySQL's more than 30 functions are quite limited...
> On the other hand, MySQL's limited fee, more than makes up for it... :-)
And whatever date functions you desire could be quickly implemented as a
UDF. If you (and others) submitted these for general use, the developers
may just include them as built ins of future releases.
jim...
| Thread |
|---|
| • SV: age | Anders Callertun | 27 Jul |
| • Re: SV: age | Jim Faucette | 27 Jul |