I have two formulas that are not working that I am trying to pull the previous quarter dates by using a Beg Date and End Date formula:
BEG DATE:
dateVar EndMonth := Date(Year(DataDate),Month(DataDate),01)-1;
If {?Denied Date From} = Date(1800,01,01) Then
(Date(Year(EndMonth),Month(EndMonth),01))
else
if {?Denied Date From} = Date(1850,01,01) then
minimum(lastfullweek)
else
if {?Denied Date From} = Date(1900,01,01) then currentdate -1
else
If {?Denied Date From} = Date(1925,01,01) Then
Switch (Month(EndMonth) in 1 to 3,Date(Year(DataDate)-01,01,01),
Month(EndMonth) in 4 to 6,Date(Year(DataDate),01,01),
Month(EndMonth) in 7 to 9,Date(Year(DataDate),04,01),
Month(EndMonth) in 10 to 12,Date(Year(DataDate),07,01))
Else
{?Denied Date From}
****My end date is working fine****
END DATE:
If {?Denied Date To} = Date(1800,01,01) Then
Date(Year(DataDate),Month(DataDate),01)-1
else
if {?Denied Date To} = Date(1900,01,01) then currentdate - 1
else
if {?Denied Date To} = Date(1850,01,01) then
maximum(lastfullweek) else
If {?Denied Date To} = Date(1925,01,01) Then
Switch (Month(DataDate) in 1 to 3,Date(Year(DataDate),01,01),
Month(DataDate) in 4 to 6,Date(Year(DataDate),03,31),
Month(DataDate) in 7 to 9,Date(Year(DataDate),06,30),
Month(DataDate) in 10 to 12,Date(Year(DataDate),09,30))
Else
{?Denied Date To}
|