Get last day of the next three months with Crystal Report -
i heading find out formula date last day of next 3 months crystal report. i've tried code below shows message when out of array of month (1-12). please give me advice address problem.
totext(date(year({rptiexsaleinvoicesummary.etd}),month({rptiexsaleinvoicesummary.etd})+4,1)-1, "dd-mmm-yyyy")
it works fine if etd's month
less 8. however, might cause problem when more 9, 10 image below.
i've found solution. please let me know if have idea solve problem.
if (month({rptiexsaleinvoicesummary.etd})+4) > 12 totext(date(year({rptiexsaleinvoicesummary.etd})+1,month({rptiexsaleinvoicesummary.etd})-8,1)-1, "dd-mmm-yyyy") else totext(date(year({rptiexsaleinvoicesummary.etd}),month({rptiexsaleinvoicesummary.etd})+4,1)-1, "dd-mmm-yyyy")
Comments
Post a Comment