help to retieve only the difference in minutes between two dates in DATETIME format

help to retieve only the difference in minutes between two dates in DATETIME format

am 18.12.2006 14:31:28 von 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

Re: help to retieve only the difference in minutes between two dates in DATETIME format

am 18.12.2006 16:19:35 von zac.carey

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

am 18.12.2006 21:56:13 von Jonathan

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

am 19.12.2006 05:51:19 von Jag

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

am 19.12.2006 05:54:56 von Jag

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