Hello everyone,
I was able to manipulate the following "If" statement for our Semi-Annual reports. Currently, the statemen will look at the effective date and give me the Prior Period of 6 months with this formula. My boss would like to also like this to pull not only for November, but also for May. I'm at a total loss. Please see the following formula:
If {S_DOC_AGREE.ATTRIB_39} = 'Quarterly' then
If date({S_DOC_AGREE.eff_start_dt}) > dateadd("m", -6, date({?year}, {?month}, 01)) then
If date({S_DOC_AGREE.eff_start_dt}) >= dateadd("m", -3, date({?year}, {?month}, 01)) then
"N/A"
else
cstr(totext(date({S_DOC_AGREE.eff_start_dt}),"MM/dd/yy")) + "-" + cstr(totext(dateadd("m", -3, dateadd("d", -1, date({?year}, {?month}, 01))), "MM/dd/yy"))
else
cstr(totext(dateadd("m", -6, date({?year}, {?month}, 01)), "MM/dd/yy")) + "-" + cstr(totext(dateadd("m", -3, dateadd("d", -1, date({?year}, {?month}, 01))), "MM/dd/yy"))
else
If date({S_DOC_AGREE.eff_start_dt}) > dateadd("m", -12, date({?year}, {?month}, 01)) then
"N/A"
else
cstr(totext(dateadd("m", -12, date({?year}, {?month}, 01)), "MM/dd/yy")) + "-" + cstr(totext(dateadd("m", -6, dateadd("d", -1, date({?year}, {?month}, 01))), "MM/dd/yy"))
Can anyone help me?
Thank you in advance.