List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:June 1 1999 6:31pm
Subject:Re: date function
View as plain text  
Michael Farr wrote:
> 
> Is there a function that returns the number of days on a particular month?
> ie
> SELECT DAYS_IN_MONTH(1999-01-01)
> 31
> 
> OR
> SELECT DAYS_IN_MONTH('JANUARY')
> 31
> 
> although this second function would fall over during a leap year

Hi Michael

How about:
SELECT
	DAYOFMONTH( DATE_SUB( '1999-02-01', INTERVAL 1 DAY ) )

Tschau
Christian

Thread
date functionMichael Farr1 Jun
  • Re: date functionChristian Mack1 Jun
  • file maker pro export to mysqlshaunb21 Jun
RE: file maker pro export to mysqlPete Lancashire22 Jun