View Single Post

  #8 (permalink)  
Old 24-07-2008, 03:02 PM
Tom Tom is offline
Wannabe Geek
 
Join Date: Jan 2007
Location: Kildare, Ireland
Posts: 183
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Tom is a splendid one to beholdTom is a splendid one to beholdTom is a splendid one to beholdTom is a splendid one to beholdTom is a splendid one to beholdTom is a splendid one to beholdTom is a splendid one to behold
Default

If you're just looking to return the month you could change the day value in mktime to 1 or anything <= 28. When doing stuff like this I'd normally give a time midway through the day to avoid day light savings problems as well.

Code:
=date("F",mktime(6, 0, 0, date("m")-3, 1, date("y")));

Edit: Just realised you need the end date of the month. You can use the t value in date to return the number of days in the given month, that should work.
__________________
MGS Web Design - Web Design Kildare, Web Design Ireland

Last edited by Tom; 24-07-2008 at 03:11 PM.
Reply With Quote