How to substract date tin SSRS Report

I want to substract the dates in run time in SSRS report, ex:- if I choose end date as 13th of this month, then Start date should be 7th of this date, and I do not want to select the start date, it will automatically substract 6 days from 13th and report will show the data from period 7th to 13th. Please let me know the if it possilbe of not, & How.
prashant04Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
shorakConnect With a Mentor Commented:
select non-query from the start date parameter properties and put this expression in the textbox:

=DateAdd("d", -6, Parameters!Enddate.Value)

where parameters!Enddate.Value is the end date parameter (replace 'Enddate' with the name of your parameter)

You must also order your parameters so the the end date is requested first else this wont work.
0
 
prashant04Author Commented:
Nothing
0
 
prashant04Author Commented:
Hi,

I have one more doubt,

Will the date automatically change when, I change the end date after running the report 1st time.
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
swadhinrayCommented:
When you select the date parameter as End Date that can be used to show all data from last 7 days.

Ex: In the expression if you select Today() it will be “14th March 2011”

So for between condition you have pass the same parameter “BETWEEN Today()-6 AND Today()”
It will be taken as “08th March 2011” AND “14th March 2011”

It depends what control you are using in the Report
0
 
swadhinrayCommented:
@prashant04: Yes the date automatically change each and every time when you run.
0
 
prashant04Author Commented:
I have applied the same before, but the sugesstion given by him was good
0
All Courses

From novice to tech pro — start learning today.