ssrs expressions
-
Friday, December 14, 2012 10:24 AM
Hi,
I need someone to please help me put this logic together into an ssrs expression, let me explain the requirement as best as i can.
I want to use this as the StartDate and i am using Today as EndDate which i want to set both in the default.
(This is a beginning of current month to date if date is less than two weeks after beginning of month date criteria is one month). Which means :-
If the current date is not 14th which is 2 weeks into the month then use the date exactly a month back(previous month) .
Thanks
biroma
All Replies
-
Friday, December 14, 2012 11:08 AM
Last date of current month
=DateAdd("d",-1,(DateAdd("m", 1, DateSerial(Year(Now()), Month(Now()), 1))))=Today.AddDays(-1 * Today.Day).AddMonths(1)
Continued from the last threadYesterday's date
=DateAdd("d", -1, Today)
=Today.AddDays(-1)
Tomorrow's date
=DateAdd("d", 1, Today)
=Today.AddDays(1)I tried putting the logic together using all theses expressions but i just didn't exactly get it.
I would be most obliged if you could please help me.
Thanks
biroma
-
Friday, December 14, 2012 11:10 AM
hi,
Try this:
=IIF(Day(Today())<14,DateAdd("m",-1,Today()),Today())
Hope this helps!
- Marked As Answer by ollumide Friday, December 14, 2012 12:18 PM
-
Friday, December 14, 2012 12:23 PM
Thanks a million, it worked but i replaced the Today in the last argument to get the first day of the current month
=IIF(Day(Today())<14,DateAdd("m",-1,Today()),DateAdd("d",-31,(DateAdd("m", 1, DateSerial(Year(Now()), Month(Now()), 1)))))
biroma

