This is probably a silly question. Is it possible to set a variable value that I could use to get data from the previous month's days? For example, if it's the 24th of September, I want everything from the 1st of August until the 31st of August. So the current date shouldn't matter. I'm using it in a Stock Take report. I use this currently:
var firstDayofPreviousMonth = DateTime.Today.AddMonths(-1);
The report runs automatically on the 1st of each month. So I figured, just pull from 1 month back, but my boss suddenly changed her mind and wants to pull the report everyday.
Does this make sense? Pop a comment if you need more information.