Avatar of Maliki Hassani
Maliki Hassani
Flag for United States of America asked on

Crystal reports: Paramater for selecting current and last quarter dates

Hello Experts,

I am trying to build a formula to be used in selection parameter to select the END of the "CurrentQuarter" and the "LastQuarter".  Here is what I have so far, it works fine to select the begining date , just need the last date of the quarter.

Current Formula:
else if (rptPeriod = "CURRENTQUARTER") Then
    bdt := Date(Year( Today),Month(DateAdd('m', -(Month(Today) Mod 3 + 2) mod 3, Today)),01)
else if (rptPeriod = "LASTQUARTER") Then
    bdt := Date(Year(DateAdd('m', (-(((Month(Today) Mod 3) + 2) mod 3)-3), Today)),Month(DateAdd('m', (-(((Month(Today) Mod 3) + 2) mod 3)-3), Today)),01)

bdt;
Crystal Reports

Avatar of undefined
Last Comment
Maliki Hassani

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Mike McCracken

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Maliki Hassani

ASKER
Thank you!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck