help to retieve only the difference in minutes between two dates in DATETIME format
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
Re: help to retieve only the difference in minutes between two dates in DATETIME format
Jag wrote:
> 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)
Re: help to retieve only the difference in minutes between two datesin DATETIME format
Jag wrote:
> 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
Re: help to retieve only the difference in minutes between two dates in DATETIME format
Thankz Jonathan your query was highly helpful,
Jonathan wrote:
> Jag wrote:
> > 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
Re: help to retieve only the difference in minutes between two dates in DATETIME format
Thankz jonathan your query was highly helpful.
Thank u strawberry your sugesstion helped me in narrowing down the
search.
Jonathan wrote:
> Jag wrote:
> > 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