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
 SQL Server Development (2000)
 Date Function

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2005-10-27 : 09:03:20
Guys,

I have date in the format '1993-10-07 00:00:00.000'
how do substract 10 year froom it to give me '1983-10-07 00:00:00.000'

datediff function doesnt give me the result

any suggestions how to do this???

Thanks

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2005-10-27 : 09:07:25
How about this ..
Select DateAdd(Year,-10,'1993-10-07 00:00:00.000')

Complicated things can be done by simple thinking
Go to Top of Page

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2005-10-27 : 09:24:11
Indeed Complicated things can be done by simple thinking

Thanks
Go to Top of Page
   

- Advertisement -