After the "RS Development Date Tip control defaults to Yesterday" this post has been a long time, please forgive me for so long to continue to write this note. Also hope to read this note of friends can learn from this note some of the RS date control and JS some of the application knowledge, of course, this can also give the Business Department monthly report of the students to provide a high-ease of Use date processing method.
1: Make sure that the report has a prompt page, the prompt page provides a function to set the default value for the date prompt control to yesterday
2: Ensure [Date dimension]. The key value format for [day] is 2009-01-01 YYYY-MM-DD
3: Make sure [facts]. The format for [date] is 2009-01-01 YYYY-MM-DD
4: Design Filter
Cast ([Diagnostic Flow].[ Date]. [year]. [Date_sk]. [Date_sk],date] between _first_of_month (? Begin_date?) and _last_of_month (? end_date?)
5:extract Method Analysis
_first_of_month (date expression) returns the date or datetime that the date expression is converted to the same month but with a daily value of 1, in the format of the parameter. Example: _first_of_month (2002-04-20) Results: 2002-04-01 Example: _first_of_month (2002-04-20 12:10:10.000) results: 2002-04-01 12:10:10.000
6:_last_of_month Method Analysis
_last_of_month (date type expression) returns the date or DateTime that corresponds to the last day of the month represented by a date expression by argument. Example: _last_of_month (2002-01-14) Results: 2002-01-31 Example: _last_of_month (2002-01-14 12:10:10.000) results: 2002-01-31 12:10:10.000
7:extract Method Analysis
Extract (date part, datetime expression) returns an Integer that represents the value of the date part in datetime expression (year, month, day, hour, minute, and second). Example: Extract (year, 2003-03-03 16:40:15.535) Results: 2003 Example: Extract (Hours, 2003-03-03 16:40:15.535) Results: 16
8: Execution effect
--8.1: Data effect for the month
As long as the start date is less than the end date, the start time and end date regardless of which day of the month is selected, the data is from the beginning of this month to the month
--8.2: Historical Data effects
As long as the start date is less than the end date, the start time and end date whichever time you choose, the data is the last day of the month from the first day of the month on which the start time is located
RS Development Date hint control defaults to yesterday's advanced article