Got one of these for SQL Server?

j/k  8^)

--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 625-9191
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
 

> -----Original Message-----
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 26, 2002 5:36 PM
> To: CF-Talk
> Subject: Re: Time calculation
> 
> 
> John Gedeon wrote:
> > I have two date and time fields, start and end. I want find the 
> difference 
> > and i want to display the difference as days:hrs:mins:secs what 
> is the best 
> > way to do that... ?
> > 
> > Right now i use hour minute and second (built in functions) and 
> those work 
> > find for differences less than one day but they do not display 
> the correct 
> > amount of hours for differences longer than 1 day...
> > any suggestions
> 
> SELECT
>       CAST(
>               (
>               EXTRACT(DAY FROM (end - start)) || ':' ||
>               EXTRACT(HOUR FROM (end - start)) || ':' ||
>               EXTRACT(MINUTE FROM (end - start)) || ':' ||
>               EXTRACT(SECOND FROM (end - start))
>               ) AS VARCHAR)
> FROM
>       table
> 
> Jochem
> 
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to