SSRS Date expressions

 First date of Current Month

=Today.AddDays(1-Today.Day)

last date of Current Month

=Today.AddDays(1-Today.Day).AddMonths(1).AddDays(-1)

First date of Current Year

=Today.AddMonths(1-Today.month).AddDays(1-Today.day)

Last date of Current Year

=Today.AddDays(1-Today.Day).AddMonths(13-today.month).AddDays(-1)

Previous Month Last Date

=DateAdd("d",-(Day(today)), Today)

Previous Month First Date

=dateadd(dateinterval.month, -1, today().AddDays(-(today().Day-1)))

Beginning of Current Month (EOM)

=DateSerial(Year(Date.Now), Month(Date.Now), 1)

Beginning of Last Month (BOM)

=DateAdd(DateInterval.Month, -1, DateSerial(Year(Date.Now), Month(Date.Now), 1))

End of Last Month (EOM)

=DateAdd(DateInterval.Minute, -1, DateSerial(Year(Date.Now), Month(Date.Now), 1))


Note : Gathered from google. Thanks to all bloggers

Comments

  1. Really good information to show through this blog. I really appreciate you for all the valuable information that you are providing us through your blog.

    ReplyDelete
  2. The information you shared was useful. Thank you for taking the time to organize it.

    ReplyDelete
  3. I appreciate the time you spent finding that information

    ReplyDelete

Post a Comment

Hi User,
Thanks for visiting My Blog and please provide your valuable feedback and subscribe for more updates. Please don't post any spam content or comments.
Thank You

Popular Posts

Failed to execute the package or element. Build errors were encountered

Restore of database 'DataBase_Name' failed. (Microsoft.SqlServer.Management.RelationalEngineTasks)

Cannot convert "Column" between a unicode and a non-unicode string data types in SSIS