List:General Discussion« Previous MessageNext Message »
From:Anders Callertun Date:July 26 1999 11:16pm
Subject:SV: age
View as plain text  
>>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... :-)

/Anders________________________________________________
visionaut              tel +46 8-617 29 92
Jakob Westinsgatan 1A  mob +46 70-565 52 19
112 20  STOCKHOLM      anders@stripped

Thread
SV: ageAnders Callertun27 Jul
  • Re: SV: ageJim Faucette27 Jul