Bman900 Posted November 21, 2011 Share Posted November 21, 2011 Basically I need to select some rows from my database that have been posted in the last 24 hours. So since my date is stored from the values of the time() function I want to do a query to get the results only greater than a certain time code. So if I lets say have this value: 1321184384, what can I subtract to go back 24 hours? Quote Link to comment https://forums.phpfreaks.com/topic/251545-getting-time-code-from-24hours-ago/ Share on other sites More sharing options...
WebStyles Posted November 21, 2011 Share Posted November 21, 2011 since that value is in seconds, just calculate how many seconds you want to subtract. Quote Link to comment https://forums.phpfreaks.com/topic/251545-getting-time-code-from-24hours-ago/#findComment-1290007 Share on other sites More sharing options...
joe92 Posted November 21, 2011 Share Posted November 21, 2011 http://lmgtfy.com/?q=how+many+seconds+in+24+hours Quote Link to comment https://forums.phpfreaks.com/topic/251545-getting-time-code-from-24hours-ago/#findComment-1290008 Share on other sites More sharing options...
Bman900 Posted November 21, 2011 Author Share Posted November 21, 2011 Ah I should of thought of this thank you!!! Quote Link to comment https://forums.phpfreaks.com/topic/251545-getting-time-code-from-24hours-ago/#findComment-1290039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.