G
Guest
I need to generate a report which grabs data from the 3 previous months (ie.
Today is July 18, so I'd want to grab data from April to June).
Currently I am using the dateserial function and subracting 3 months for my
start date and DateSerial(year(date()),1,1) as my end date. But I also had
to include an if clause for Dates where the month is before April where I
have to set the year back 1 also (ie. Start date =
DateSerial(year(date))-1,month(date())+9,1).
Is there a better way to set the start date?
TIA
Today is July 18, so I'd want to grab data from April to June).
Currently I am using the dateserial function and subracting 3 months for my
start date and DateSerial(year(date()),1,1) as my end date. But I also had
to include an if clause for Dates where the month is before April where I
have to set the year back 1 also (ie. Start date =
DateSerial(year(date))-1,month(date())+9,1).
Is there a better way to set the start date?
TIA