Forum Moderators: coopster

Message Too Old, No Replies

Get MYSQL dates by .

Cant figure it out...

         

Angelis

1:17 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



I have a script that lists entries added within the last week which is easily done by using...

DATE_SUB(CURDATE(),INTERVAL 7 DAY)

However if I wanted to get everything on a Month to Date basis how would I do it...

e.g.

If it is the 12th day of the month I would want all results for days 1-2-3-4... etc

If anyone can help it would be appreciated...

arran

1:26 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Try something like:

... where month(curdate()) = month(your_date_column)...

arran.

Angelis

1:42 pm on Oct 10, 2005 (gmt 0)

10+ Year Member



Will give it a shot... Doesnt look right but I will see what happens.

Thanks