Several months ago, I made a list of date functions I commonly used to set the default value of an SSRS Parameter. I put it on our internal network for my colleagues, and today figured I may as well publish it on my blog too.
| Function | Description |
| Today (00:00:00) |
=DateSerial(Year(Now()), Month(Now()), Day(Now())) |
| 1st of Current Month (00:00:00) |
=DateSerial(Year(Now()), Month(Now()), 1) |
| 1st of Last Month (00:00:00) |
=DateSerial(Year(Now()), Month(Now())-1, 1) |
| 1st of Current Year (00:00:00) |
=DateSerial(Year(Now()), 1, 1) |
| Last of Current Month (23:59:59) |
=DateAdd(“S”, -1, DateSerial(Year(Now()), Month(Now())+1,1)) |
| Last of Last Month (23:59:59) |
=DateAdd(“S”, -1, DateSerial(Year(Now()), Month(Now()),1)) |
As with all things, make sure you test before implementing to ensure it does exactly as you need.
If you have a favorite you use regularly, add it to the comments and I’ll include it in the post.












