Discussion:
help to retieve only the difference in minutes between two dates in DATETIME format
(too old to reply)
Jag
2006-12-18 13:31:28 UTC
Permalink
Hi all,
i am just lookin for a func or way about to retrieve the
difference in minutes between 2 dates which are of DATETIME data type
for induvidual records help in this regard is highly solicited
Thankz in Advance
Jag
strawberry
2006-12-18 15:19:35 UTC
Permalink
Post by Jag
Hi all,
i am just lookin for a func or way about to retrieve the
difference in minutes between 2 dates which are of DATETIME data type
for induvidual records help in this regard is highly solicited
Thankz in Advance
Jag
see UNIX_TIMESTAMP(date)
Jonathan
2006-12-18 20:56:13 UTC
Permalink
Post by Jag
Hi all,
i am just lookin for a func or way about to retrieve the
difference in minutes between 2 dates which are of DATETIME data type
for induvidual records help in this regard is highly solicited
Thankz in Advance
Jag
I would do something like this:

SELECT TIME_TO_SEC(TIMEDIFF('2006-11-23 23:45:00', '2006-11-30 23:46:31'));

which results in to 604709 seconds.

Jonathan
Jag
2006-12-19 04:51:19 UTC
Permalink
Thankz Jonathan your query was highly helpful,
Post by Jonathan
Post by Jag
Hi all,
i am just lookin for a func or way about to retrieve the
difference in minutes between 2 dates which are of DATETIME data type
for induvidual records help in this regard is highly solicited
Thankz in Advance
Jag
SELECT TIME_TO_SEC(TIMEDIFF('2006-11-23 23:45:00', '2006-11-30 23:46:31'));
which results in to 604709 seconds.
Jonathan
Jag
2006-12-19 04:54:56 UTC
Permalink
Thankz jonathan your query was highly helpful.
Thank u strawberry your sugesstion helped me in narrowing down the
search.
Post by Jonathan
Post by Jag
Hi all,
i am just lookin for a func or way about to retrieve the
difference in minutes between 2 dates which are of DATETIME data type
for induvidual records help in this regard is highly solicited
Thankz in Advance
Jag
SELECT TIME_TO_SEC(TIMEDIFF('2006-11-23 23:45:00', '2006-11-30 23:46:31'));
which results in to 604709 seconds.
Jonathan
Loading...