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
 General SQL Server Forums
 New to SQL Server Programming
 Date Function

Author  Topic 

gemispence
Yak Posting Veteran

71 Posts

Posted - 2006-02-17 : 15:47:40
I'm trying to create a function that takes a DATETIME field and adds 30 days to it. Does anyone know the syntax for this? Thanks in advance. :)

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2006-02-17 : 15:54:48
No need to create one, sql already did: DateAdd

dateadd(day, 30, myDateColumn)

Be One with the Optimizer
TG
Go to Top of Page

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2006-02-17 : 15:55:10
Check out DATEADD.

hmmm now where is that sniped jpg
Go to Top of Page
   

- Advertisement -