sasori Posted April 5, 2011 Share Posted April 5, 2011 How to solve this? I have a dateCreate column at my table and it was created as DATETIME as the data type. the sample data is being saved as e.g 2011-04-05 12:22:32 The issue is, I need to have an option in my app to pull out datas based from 1) the last day it was created 2) 3 days ago 3) 5 days ago 4) 1 week ago 5) fortnight ago 6) month ago 7) quarter ago 8 ) 6 months ago 9) year ago 10) year+ ago Link to comment https://forums.phpfreaks.com/topic/232731-date-time-interval-issue/ Share on other sites More sharing options...
gizmola Posted April 5, 2011 Share Posted April 5, 2011 I wrote about this long long ago http://www.gizmola.com/blog/archives/51-Exploring-Mysql-CURDATE-and-NOW.-The-same-but-different..html Link to comment https://forums.phpfreaks.com/topic/232731-date-time-interval-issue/#findComment-1197046 Share on other sites More sharing options...
sasori Posted April 5, 2011 Author Share Posted April 5, 2011 thanks alot.it helps a bit part in my problem Link to comment https://forums.phpfreaks.com/topic/232731-date-time-interval-issue/#findComment-1197324 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.