Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
I there an easy way to:@DateFrom = get current Year/Month and then subtract 1 month (to get previous month) and then set the beginning date to first day in the previous month@DateTo = get current Year/Month and then subtract 1 month (to get previous month) and then set the ending date being last day in the previous month. Thank you.
Just be cautious using Lamprey's suggestion if the column you are filtering on contains time information other than 12am / "00:00:00".N 56°04'39.26"E 12°55'05.63"
snufse
Constraint Violating Yak Guru
469 Posts
Posted - 2009-07-28 : 11:38:42
Yes I am aware of that, you pointed this out to me earlier....