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 |
|
sunnyday126
Starting Member
5 Posts |
Posted - 2007-03-08 : 19:14:32
|
| How do I declare the beginning of the month? (3/1/07) By running this, I get 3/7/2007. Thanks!declare @paramtoday datetimedeclare @parammoend1 datetimeSet @parammoend1 = DateAdd(d,1, @paramtoday) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-08 : 20:42:25
|
[code]select dateadd(month, datediff(month, 0, getdate()), 0)[/code] KH |
 |
|
|
sunnyday126
Starting Member
5 Posts |
Posted - 2007-03-09 : 13:49:37
|
| Nice!! Thank you!! |
 |
|
|
|
|
|