How to Get days of Month in SSRS
How can I get days of Month in SSRS report...?
April 24th, 2015 12:31pm

You mean you need to find out if the days are 30 or 31 etc..?

If yes, please refer:

http://consulting.risualblogs.com/blog/2013/02/14/ssrs-expression-number-of-days-in-a-month/

Free Windows Admin Tool Kit Click here and download it now
April 24th, 2015 12:56pm

No, I want to get all dates of current month

Like Current Month in April and I want all dates of Current Month...

April 25th, 2015 8:12am

I don't think there's any in-built expression/function for that. You could change a query to generate all days of Month

Please refer: http://stackoverflow.com/questions/7638305/generation-of-all-days-in-a-month-in-ssrs

Free Windows Admin Tool Kit Click here and download it now
April 25th, 2015 8:16am

Hi RedZinc,

You can do it by writing a SQL query to generate days of month. For doing recursive to generate days,

Use CTE with recursive logic:

Delcare @StartDate as DATE, @EndDate as DATE; SET @StartDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(GETDATE())-1),GETDATE()),101) SET @EndDate = CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,Getdate()))),DATEADD(mm,1,Getdate())),101) ;WITH cte AS ( SELECT @StartDate AS myDate UNION ALL SELECT DATEADD(Day,1,myDate) FROM cte WHERE DATEADD(Day,1,myDate) <= @EndDate )

Didn't tested the above sql code, but you will get an idea how you can implement with CTE.

April 26th, 2015 2:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics