SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Help with GetDate()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

blackX
Posting Yak Master

USA
102 Posts

Posted - 02/25/2008 :  13:54:58  Show Profile  Reply with Quote
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

USA
7423 Posts

Posted - 02/25/2008 :  14:01:07  Show Profile  Visit jsmith8858's Homepage  Reply with Quote
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 - 02/25/2008 :  14:01:56  Show Profile  Reply with Quote


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




Edited by - X002548 on 02/25/2008 14:03:27
Go to Top of Page

blackX
Posting Yak Master

USA
102 Posts

Posted - 02/25/2008 :  15:26:15  Show Profile  Reply with Quote
thanks alot, it was just what I needed
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000