SQL SSRS Scheduling Date Parameter

On 14 October 2016, in IT Procedure, Programming, SQL, SSRS, by Himselff

I’ve found those expression which i put on the default value of the StartDate and EndDate parameter on my reports :


First day of last month:
=dateadd("m",-1,dateserial(year(Today),month(Today),1))
First day of this month:
=dateadd("m",0,dateserial(year(Today),month(Today),1))
First day of next month:
=dateadd("m",1,dateserial(year(Today),month(Today),1))
Last day of last month:
=dateadd("m",0,dateserial(year(Today),month(Today),0))
Last day of this month:
=dateadd("m",1,dateserial(year(Today),month(Today),0))
Last day of next month:
=dateadd("m",2,dateserial(year(Today),month(Today),0))

Ref : http://stackoverflow.com/questions/2059977/find-first-and-last-day-for-previous-calendar-month-in-sql-server-reporting-serv

 

Comments are closed.