Unanswered: Date difference function (time elapsed)
Hi, I am wondering if anyone knows where to find a function that returns the time elapsed between two dates.
I have todays date and a date in the past in the form mm/dd/yyyy and need to have the number of years, months, and days that have elapsed. For example, since mm/dd/yyyy - "5 years 2 months and 12 days have passed"
The Datediff function does not do this completely.
Any input would incredibly appreciated.
While likely not the most accurate mathematically, here's where I am so far. I think works using DayOfYear as opposed to Day but dMonth creates the inaccuracy. Might be able to get a better algorithm once I think more about it:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim EndDate, StartDate As Date
Dim dYears, dMonth, dDays As String