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.
| Author |
Topic |
|
esthera
Master Smack Fu Yak Hacker
1410 Posts |
Posted - 2010-05-25 : 12:52:32
|
| what's wrong with this?select dateadd(d,-1,(dateadd(mm, 24,getdate())) |
|
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2010-05-25 : 13:02:04
|
??select dateadd(d,-1,dateadd(mm, 24,getdate())) Success is 10% Intelligence, 70% Determination, and 22% Stupidity.\_/ _/ _/\_/ _/\_/ _/ _/- 881 |
 |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2010-05-25 : 13:03:22
|
| You're missing a )select dateadd(d,-1, (dateadd(mm, 24, getdate() ) ) )JimEveryday I learn something that somebody else already knew |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-25 : 13:04:00
|
select dateadd(d,-1,(dateadd(mm, 24,getdate()))) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-05-25 : 13:04:41
|
 No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-26 : 04:15:12
|
| It can be simplified toselect dateadd(month, 24,getdate()-1)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|