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.

1

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

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -