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:20
I have my default on a date field set to getdate().
How can I change this to getdate()-7 hours?

nr
SQLTeam MVY

12543 Posts

Posted - 2004-10-23 : 16:23:24
dateadd(hh,-7,getdate())


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -