mySQL.. help please :)

Associate
Joined
12 Mar 2009
Posts
11
I need to view all records which are in the range : (today + one month)
dateline_from is my date time (UNIX format).

I know how to convert UNIX to normal date time its FROM_UNIXTIME(date,format).

How would i do this... Using MySql ??

a bit of statment which might help

SELECT * FROM `event` WHERE FROM_UNIXTIME( `dateline_from` , format)
 
If you're using 31 days as a month, just do everything from now() to now() + (86400 x 31)
 
Does
Code:
SELECT * FROM `event` WHERE FROM_UNIXTIME( `dateline_from` , format)  between CURDATE() and DATE_ADD(CURDATE(), INTERVAL 1 MONTH);
Work?
You could replace CURDATE() with FROM_UNIXTIME( `dateline_from` , format)
 
Back
Top Bottom