Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Date Function Problem

Author  Topic 

immad
Posting Yak Master

230 Posts

Posted - 2013-05-29 : 07:04:30
can any one explain me what is written in red

RIGHT('0' + CONVERT(varchar(4),DATEDIFF(dd,0,DATEADD(ss,TimeDiffInSec,0)) * 24 + (TimeDIffInSec/3600)), 2) + ':' +
RIGHT(CONVERT(varchar(8),DATEADD(ss,TimeDIffInSec,0),108),5)

immad uddin ahmed

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-29 : 07:17:54
they're just inreger values to represent date values. 0 corresponds to base date value of 19000101. each unit represents a day
see

http://visakhm.blogspot.in/2012/07/generate-datetime-values-from-integers.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -