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 |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2011-08-29 : 12:05:57
|
| How can I get the previous months date out of the getDate() function in '2011-08-01 00:00:00.000' format?I want '2011-08-01 00:00:00.000' to look like '2011-07-01 00:00:00.000' |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 12:25:19
|
| SELECT DATEADD(mm,DATEDIFF(mm,0,GETDATE())-1,0)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2011-08-29 : 13:02:50
|
| Great, thanks for both...! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-08-29 : 13:13:28
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|