How to convert double formatted DATETIME to months


I want result in months after differentiating two dates.

As per OOTB fuction @DateTimedifference(datetime1, datetime2) it returns Result in double.

I want convert double formatted date to months


**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.


Keep up to date on this post and subscribe to comments

December 19, 2011 - 3:35am

In the same function you can mention the precision as 'M' to calculate the different as month..

EX: @DateTimeDifference(Date1,Date2,'M')

other precisions:
s - sec
m - min
h - hours
D - days
M - Months
Y - Year

Please let us know if this helpful.

December 24, 2011 - 7:16am

It was really helpful Thanks

July 10, 2015 - 1:45pm

For milli seconds, it will capital 'S'

December 17, 2015 - 2:02pm

Hi Customer want to change Month to month change Eg;(11-15-2015 to 12-15-2015)

and how to change every year at the last month Eg (12-15-2015 to 01-15-2016)

Can you help?