List:General Discussion« Previous MessageNext Message »
From:Chris Trown Date:May 29 1999 12:22am
Subject:Re: Last day of month
View as plain text  
On Fri, May 28, 1999 at 07:08:44PM -0500, American Data Processing, INC scribbled:
> A workaround would be to find the first day of the given month, add 32 days, find the
> first day of that month, then subtract one day.
> #
> 

     Or, find midnight of the 1st of the next month.  Then subtract 1 second.
That will give you the month and day in question.

Chris...

> -----Original Message-----
> From:	Robert Andersson [SMTP:robert@stripped]
> Sent:	Thursday, January 28, 1999 9:01 AM
> To:	mysql@stripped
> Subject:	Q: Last day of month
> 
> Hi all!
> 
> I have been looking through chapter 7.3.11 (date and time functions)
> but could not find a function that returns the last day of a
> month. Or have I overlooked something?
> 	   The function that I want could look something like
> 
> 	   LASTDAYOFMONTH(V) or NUMBEROFDAYSINMONTH(V)
> 	   Returns the last day of the month of V, where V could be in the
> 	   format YYMM or YYYYMM.
> 
> Is there a simple solution in mySQL to do this or do I have to do it
> >externally<?
> 
> Yours,
> /Robert
> 
> -- 
> Computational Linguistics
> Department of Linguistics
> Goteborg University
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread4097@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
> 
> 
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread4119@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
> 

-- 
What's the point?

An NT server can be run by an idiot, and usually is.
PGP fingerprint: 063FCE320681C336  78C164FC9B2F91EA
Thread
RE: Last day of monthINC American Data Processing29 May
  • Re: Last day of monthChris Trown29 May