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)
 getdate()

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2004-10-23 : 15:18:21
I have my default on a date field set to getdate().
How can I change this to getdate()-7 hours?

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2004-10-23 : 16:13:41
Change it to DATEADD(hh,-7,getdate())

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -