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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 difeerence b/w two dates and time

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-08 : 08:06:52
putane writes "Hi

please give me a code to subtract 2 b/w 2 dates it should be year,month,day,hour,minute,seconds.


ex: '2006-10-19 22:34:27','2004-05-1 10:04:17'

regards
P.M.SANJAY"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-08 : 08:13:04
What is a year? With or without a leap-day?
Search this forum for functions made by Michael Valentine Jones.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-11-08 : 11:34:57
Look under the "Uses of the DATETIME data type" in the link below for how to get Elapsed time.


Date/Time Info and Script Links
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=64762


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -