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
Jag [ Mo, 18 Dezember 2006 14:31 ] [ ID #1571255 ]

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)
zac.carey [ Mo, 18 Dezember 2006 16:19 ] [ ID #1571256 ]

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
Jonathan [ Mo, 18 Dezember 2006 21:56 ] [ ID #1571258 ]

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
Jag [ Di, 19 Dezember 2006 05:51 ] [ ID #1572397 ]

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
Jag [ Di, 19 Dezember 2006 05:54 ] [ ID #1572398 ]
Datenbanken » mailing.database.mysql » help to retieve only the difference in minutes between two dates in DATETIME format

Vorheriges Thema: Optimize this!
Nächstes Thema: shorter the text