Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Parameter for prior 3 month

Status
Not open for further replies.

kdavis6416

Technical User
Dec 1, 2011
6
US
I am trying to set a data parameter for the prior 3 months. E.g. If I ran it today on 8/16/18 I need the data range to be 5/1/2018 - 07/31/2018. This is what I have so far and it only brings back last months data.
_____________________________________________________________

if {?Relative Date} = "90 Days" then
(
RecStartDate := Minimum(LastFullMonth)-90;
RecEndDate := Maximum(LastFullMonth);

)

 
I think i would use the below (typed from memory and untested today)


RecStartDate := dateserial(year(currentdate),month(currentdate)-3,1);

RecEndDate := dateserial(year(currentdate),month(currentdate),1)-1;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top