Thought this might be useful.
I think this handles everything apart from leap years. This is for text output. Add TODATETIME for datetime format.
I think this handles everything apart from leap years. This is for text output. Add TODATETIME for datetime format.
Code:
=if(right(FROMDATETIME(DateValue,"{CCYYMMDD}") ,2) = word("31,28,31,30,31,30,31,31,30,31,30,31",",",TEXTTONUMBER(mid(FROMDATETIME(DateValue,"{CCYYMMDD}"),5,2) )),
word("31,28,31,30,31,30,31,31,30,31,30,31",",",mod(
TEXTTONUMBER(mid(FROMDATETIME(DateValue,"{CCYYMMDD}"),5,2) )+
MonthsToAdd, 12)),
right(FROMDATETIME(DateValue,"{CCYYMMDD}") ,2))
+ "/" +
NUMBERTOTEXT(mod(
TEXTTONUMBER(mid(FROMDATETIME(DateValue,"{CCYYMMDD}"),5,2) )
+
MonthsToAdd, 12))
+ "/" +
NUMBERTOTEXT(
TEXTTONUMBER(left(FROMDATETIME(DateValue,"{CCYYMMDD}"),4))
+int((MonthsToAdd + TEXTTONUMBER(mid(FROMDATETIME(DateValue,"{CCYYMMDD}"),5,2) )) / 12)
)