Jump to content

Selecting the next 24 hours - timestamps..


Scooby08

Recommended Posts

I had this query working before to select all records with a date that was within the next 24 hours, but it wasn't with timestamps..

 

SELECT * FROM table WHERE (Time_TS BETWEEN NOW() AND NOW() + INTERVAL 24 HOUR)

 

My timestamps are retrieved from an XML file and look like this: 1265414700000

 

What do I need to change for timestamps? I also tried this:

 

SELECT * FROM table WHERE (Time_TS BETWEEN CURRENT_TIMESTAMP() AND CURRENT_TIMESTAMP() + INTERVAL 24 HOUR)

 

Thanks!

 

Link to comment
https://forums.phpfreaks.com/topic/191010-selecting-the-next-24-hours-timestamps/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.