Question

I have a requirement where I need to display years and months based on years ( current date, old date )

Hi Team,

I have a requirement where I need to display years and months based on years ( current date, old date )

ex: Current date :23-02-2018 old date : 15-01-2016 , we are excepting 2 years 1 Month.

Could you please let us know .

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

February 23, 2018 - 2:17am

I don't think there is an OOTb feature to achieve this directly , however u can use a function of ur own and return the value u want or u can use OOTB DateTimeDifference function and get the difference in months and with some manipulation like dividing it by 12 and u can get the years and months which u can append in any format u want.

February 23, 2018 - 4:54am

Hi Madhu,

 

Use a Data transform. Store the Current date and Old date then convert these both to date time using toDateTime function. Then use date time difference function to get the result in either Year or Month or Hr or Minute or second