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
 Transact-SQL (2000)
 Help with GetDate()

Author  Topic 

blackX
Posting Yak Master

102 Posts

Posted - 2008-02-25 : 13:54:58
I am needing to return a value that is 3 hours less than the current time. How can I do this using the getdate function? Thanks for all your help.

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-02-25 : 14:01:07
look up the DateAdd() function, it will do what you want.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2008-02-25 : 14:01:56


DATEADD(hh,-3,GetDate())



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

blackX
Posting Yak Master

102 Posts

Posted - 2008-02-25 : 15:26:15
thanks alot, it was just what I needed
Go to Top of Page
   

- Advertisement -