How to default date parameters

Below is the code to default the date parameters, and I link to a step-by-step video that shows you how to do it. Enjoy

Here is a link to a video that details the entire process

https://www.youtube.com/watch?v=GBYWKdoVrOM

And here are the code snippets that you'll want to use

'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))

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences