Calculating timespan with t-sql

Posted by jdiaz on Stack Overflow See other posts from Stack Overflow or by jdiaz
Published on 2009-04-17T03:24:14Z Indexed on 2010/06/15 0:42 UTC
Read the original article Hit count: 778

Filed under:
|

Given two date/times:

@start_date = '2009-04-15 10:24:00.000'
@end_date = '2009-04-16 19:43:01.000'

Is it possible to calculate the time elapsed between the two dates in the following format

1d 9h 19m

© Stack Overflow or respective owner

Related posts about sql-server-2005

Related posts about tsql