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)
 SQL datetime field

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-30 : 09:16:08
Nameesh writes "How can I subtract two datetimes fields and then show proper time ?"

Nazim
A custom title

1408 Posts

Posted - 2002-04-30 : 10:16:30
Check for DateDiff function.

Alternatively you can do that with a normal subtract operationr - .




--------------------------------------------------------------
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-04-30 : 10:58:03
what is 'proper time'?

also

what does it mean to you to "subtract two datetimes fields"? the subtraction operator won't do what you expect with two dates. @somedatetime - 1 = the day before @somedatetime . . . @somedatetime - @someotherdatetime = (the number of days between @someotherdatetime and 1/1/1900) before @somedatetime.

please post an example of what you are trying to do.



<O>
Go to Top of Page
   

- Advertisement -