Format years, months, dates between dates
Hello good people - I've an 'easy;' one whipping my butt.
I have two random dates, I need to display how many years, months, days have passed between the dates.
I've been playing around with DateDiff and its all fine to "year" level, but days and months are killing me. I tried one of Ben Nadel's techniques, but I end up with a "12" on my month counter when it should be "0". (For the record, for testing purposes I had my two dates precisely a year apart, and got 1 year and 12 months... erm, no!)
Yes, I have searched these forums (and others). Yes, I got lost as none of them are helpful, either over complicared, or too siimple "Just use datediff()".
I cannot beleive somehting this simple (which I can do in Excel* in 12 seconds) has now been taking all weekend on Coldfusion.
*Example of Excel code which is working 100%
=DATEDIF(E6,B!, "y") & " y " & DATEDIF(E6, B1, "ym") & " m " & DATEDIF(E6,B1, "md") & " d."
