magnetica Posted January 30, 2010 Share Posted January 30, 2010 I want to make two timestamps so I can SELECT everything in the DB between these two dates. I need the first timestamp to be the last month so if it February now then the first timestamp should be "2010-01-01 00:00:00" and the second should be the last day in the month so with this example it would be "2010-01-31 00:00:00". How do I go about doing this? Thanks Sean Link to comment https://forums.phpfreaks.com/topic/190352-create-a-timestamp-in-php/ Share on other sites More sharing options...
magnetica Posted January 30, 2010 Author Share Posted January 30, 2010 Ok, I have figured everything else out, all I now need some advice on is how to know what the last date of the month is. Will I have to do this manually? Thanks Link to comment https://forums.phpfreaks.com/topic/190352-create-a-timestamp-in-php/#findComment-1004227 Share on other sites More sharing options...
Mchl Posted January 30, 2010 Share Posted January 30, 2010 Just do WHERE MONTH(dateColumn) = 1 AND YEAR(dateColumn) = 2010 Link to comment https://forums.phpfreaks.com/topic/190352-create-a-timestamp-in-php/#findComment-1004237 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.