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 |
Blessed1978
Yak Posting Veteran
97 Posts |
Posted - 2014-08-26 : 14:35:40
|
Date function that gets dates within current month onlyso if i run a report ON AUGUST 10, It should only get dates between August 1 - 10 . AUGUST 28 should get dates between August 1 - 28 etchow do i accomplish this |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-08-26 : 15:12:31
|
[code]WHERE yourDateCol >= DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0) AND yourDateCol < GETDATE()[/code] |
|
|
|
|
|