Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I am facing issue while calculating the time period. The calculation will be like when I select the Insurance number the related service period should be display like 6 years 7 months and 3 days.
Ex: Insurance No 3:
CompanyName StartDate End Date
AAA 18/09/2014 21/09/2015
BBB 25/10/2015 30/11/2016
CCC 07/12/2016 18/07/2017
If I select Insurence number 3 the number of years of service will be like: 3 years 4 months and 7 days.
While calculating if total months crossed 12 then year value should be increase and days crossed 30 or 31 then month value should be increase.
Could you please help to resolve this issue.
Regards,
Ram
Same issue Difference between two dates in Year,Month and Days
Try
if(div(date(EndDate)-date(StartDate),365) >0,div(date(EndDate)-date(StartDate),365) & ' Years ')
& if(div(mod(date(EndDate)-date(StartDate),365),30) >0,div(mod(date(EndDate)-date(StartDate),365),30) & ' Months ') &
if(mod(mod(date(EndDate)-date(StartDate),365),30)>0, mod(mod(date(EndDate)-date(StartDate),365),30) & ' Days')