Link to home
Start Free TrialLog in
Avatar of Maliki Hassani
Maliki HassaniFlag 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;
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Maliki Hassani

ASKER

Thank you!