View Single Post

  #5 (permalink)  
Old 24-07-2008, 01:58 PM
jmcc's Avatar
jmcc jmcc is offline
Wannabe Geek
 
Join Date: Feb 2006
Posts: 311
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
jmcc is just really nicejmcc is just really nicejmcc is just really nicejmcc is just really nice
Default

Quote:
Originally Posted by louie View Post
I am not sure if that will work with MySQL version but the problem I came across was with the date format I need which unfortunately has to be exact

e.g.
start date 2008-01-01
end date 2008-03-31 or 30 or 28/29 (February)

I could manage the start date easily (already done) as all months starts with 01 but the end date seems to be a pain and I thought I might ask if there is a function already available as I might have to spend few hours to create one.
Perhaps using the DATE_SUB to generate the month and then using a limiter on the DATE function might work or alternatively (in a major kludge) use a number of DATE_SUB queries to generate the limits. Subtracting 3 months gives the lower limit, subtracting two months and then a day gives the upper limit. Very inelegant but it may work.

Regards...jmcc
Reply With Quote