Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Date difference in Days,hours minutes and seconds.

$
0
0


Hi All,

I have two date Suppose one is getdate() and other one is gatedate() +1 .I have to show the difference, currently I used a datediff in the stored proc which just shows the difference of the days :( but i need to show the difference in days:hours:minutes:seconds if possible.

its a countdown with the current date. Like the two fields are sale_start_date and sale_end_date. Hope i am clear.

Please let me know ASAP thanks in advance.
Can anyone help me?all help is great help.

Say the difference of

12/6/2007 7:00:00 AM, 12/8/2007 8:00:00 AM  as 2 days 1:00:00)

Thanks
N


Viewing all articles
Browse latest Browse all 23857

Trending Articles