sofia403 Posted May 15, 2011 Share Posted May 15, 2011 I have a column "submission_date" type DATE and also a column "Elapsed_time" Question is - is it possible to calculate the date difference in days from "submission_date" to current date and display the values In "elapsed_time" So basically column "elapsed_time" would always have an updated value in it. Probably a very simple question for most of you, any help or pointers are much appreciated. Link to comment https://forums.phpfreaks.com/topic/236471-calculating-date-on-the-fly/ Share on other sites More sharing options...
Zane Posted May 15, 2011 Share Posted May 15, 2011 I don't believe you can have an autoupdating column... unless you make a cron job to update the database everyday. But there is a MYSQL function called DATEDIFF that allows you to get this info on the fly Link to comment https://forums.phpfreaks.com/topic/236471-calculating-date-on-the-fly/#findComment-1215727 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.