Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

97 Posts

Posted - 08/26/2014 :  14:35:40  Show Profile  Reply with Quote
Date function that gets dates within current month only
so 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 etc

how do i accomplish this

James K
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 08/26/2014 :  15:12:31  Show Profile  Reply with Quote
	yourDateCol >= DATEADD(mm,DATEDIFF(mm,0,GETDATE()),0) 
	AND yourDateCol < GETDATE()
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000