cancel
Showing results for 
Search instead for 
Did you mean: 

dates calculation help...

Former Member
0 Kudos

I want to be able to return a value that states : "2 Years-7 Month-12 Days" between the two dates?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You can achieve the same using the following steps. The mentioned steps are to calculate them at the report level.

If you want to calculate them at the DB level you can convert the same.

 
Years = MonthsBetween(date1;date2)/12

Months = (MonthsBetween(date1;date2) - (Years *12))

Days = DaysBetween(date1;date2) - ( Years * 365 + Months * 30 )

Then Concatenate the three variables to get the required result.

Regards,

Rohit

Edited by: rohit12 on Oct 6, 2009 2:41 PM

Former Member
0 Kudos

Very nice!

Thanks Rohit

Answers (0)