Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


Different Date Calculations in SSRS

AddThis Social Bookmark Button
While designing the reports, we need to set default date values in Date data type parameter.  This question also appears many times in forums. So, I decided to create a comprehensive list of all such expressions. Now, In expression editor we can use native VB functions for different date calculation and we can also use .Net Properties and Methods for doing the calculation. So, one case use any one based on convenience. Below table contains list of all such expressions in both VB native function as well as using .NET properties and methods. This is not the only way to find this
value, there can be some other expressions for each value. But, I have tried to create a list to be start with and later on I will add more.   Using Native VB Functions Using .Net Properties and Functions First Date of last month =DateAdd("m", -1, DateSerial(Year(Now()), Month(Now()), 1)) =Today.AddDays(1- Today.Day).AddMonths(-1) Last date of last month =DateAdd("d", -1, DateSerial(Year(Now()), Month(Now()), 1)) =Today.AddDays(-1.0 * Today.Day) First date of current month =DateSerial(Year(Now()), Month(Now()), 1) =Today.AddDays(1 - Today.Day) Last date of current month =DateAdd("d",-1,(DateAdd("m", 1, DateSerial(Year(Now()), Month(Now()),...(Read whole news on source site)

Home : Blog List : Chintak's Blog : Different Date Calculations in SSRS