There is a time stamp column/field in a table, and the format is like
2009-12-05 10:35:28,
Now I want to get the time in terms of minutes(How many minutes have elapsed) elapsed from then on, how to do it?
There is a time stamp column/field in a table, and the format is like
2009-12-05 10:35:28,
Now I want to get the time in terms of minutes(How many minutes have elapsed) elapsed from then on, how to do it?
TIMEDIFF()
can be used to get a difference between date/time values, which is expressed in a "HH:MM:SS.SSSSSS" format.
TIME_TO_SEC()
can convert this into a number of seconds.
SELECT TIME_TO_SEC(TIMEDIFF(NOW(), my_date_and_timestamp)) / 60;