' Since ' expD1 Date ' expL1 Since ' expC1 Since Public Function Since(ByVal tdDate As Date, ByVal tlSince As Boolean, _ ByVal tcSince As String) As String Dim lcHtml As String = "" Dim ldDateEquivalentToLastYear As Date = Nothing Dim ldDateEquivalentToThisYear As Date = Nothing Dim lnDay As Integer = 0 Dim lnHour As Integer = 0 Dim lnLocation As Integer = 0 Dim lnMinute As Integer = 0 Dim lnMonth As Integer = 0 Dim lnSecond As Integer = 0 Dim lnYear As Integer = 0 lnSecond = DateDiff(DateInterval.Second, tdDate, Date.Now) lnMinute = DateDiff(DateInterval.Minute, tdDate, Date.Now) lnHour = DateDiff(DateInterval.Hour, tdDate, Date.Now) lnDay = DateDiff(DateInterval.Day, tdDate, Date.Now) lnMonth = DateDiff(DateInterval.Month, tdDate, Date.Now) lnYear = DateDiff(DateInterval.Year, tdDate, Date.Now) ' Date equivalent to last year ldDateEquivalentToLastYear = New Date(Date.Now.Year - 1, tdDate.Month, tdDate.Day, tdDate.Hour, tdDate.Minute, tdDate.Second) ' Date equivalent to this year ldDateEquivalentToThisYear = New Date(Date.Now.Year, tdDate.Month, tdDate.Day, tdDate.Hour, tdDate.Minute, tdDate.Second) ' If we have a year If lnYear > 0 Then lcHtml = oApp.GetNumberRepresentationPhrase(lnYear, "year") lnMonth = lnMonth - (lnYear * 12) End If ' If we have a month If lnMonth > 0 Then ' If we have something If lcHtml.Length > 0 Then lcHtml = lcHtml + ", " End If lcHtml = lcHtml + oApp.GetNumberRepresentationPhrase(lnMonth, "month") End If ' If we have passed that date If Date.Now > ldDateEquivalentToThisYear Then ' Add the months ldDateEquivalentToThisYear = ldDateEquivalentToThisYear.AddMonths(lnMonth) lnDay = DateDiff(DateInterval.Day, ldDateEquivalentToThisYear, Date.Now) Else lnDay = DateDiff(DateInterval.Day, ldDateEquivalentToLastYear, Date.Now) End If ' If we have a day If lnDay > 0 Then ' If we have something If lcHtml.Length > 0 Then lcHtml = lcHtml + ", " End If lcHtml = lcHtml + oApp.GetNumberRepresentationPhrase(lnDay, "day") End If ' Adjust the hours lnHour = lnHour Mod 24 ' If we have an hour If lnHour > 0 Then ' If we have something If lcHtml.Length > 0 Then lcHtml = lcHtml + ", " End If lcHtml = lcHtml + oApp.GetNumberRepresentationPhrase(lnHour, "hour") End If ' Adjust the minutes lnMinute = lnMinute Mod 60 ' If we have a minute If lnMinute > 0 Then ' If we have something If lcHtml.Length > 0 Then lcHtml = lcHtml + ", " End If lcHtml = lcHtml + oApp.GetNumberRepresentationPhrase(lnMinute, "minute") End If ' Adjust the seconds lnSecond = lnSecond Mod 60 ' If we have a second If lnSecond > 0 Then ' If we have something If lcHtml.Length > 0 Then lcHtml = lcHtml + ", " End If lcHtml = lcHtml + oApp.GetNumberRepresentationPhrase(lnSecond, "second") End If ' Find last comma lnlocation = oApp.RAt(",", lcHtml) ' If we found it If lnLocation > 0 Then lcHtml = Mid(lcHtml, 1, lnLocation - 1) + " and" + Mid(lcHtml, lnLocation + 1) End If ' If we show the since If tlSince Then lcHtml = tcSince + " " + LCase(lcHtml) Else lcHtml = UCase(Mid(lcHtml, 1, 1) + Mid(lcHtml, 2)) End If Return lcHtml End FunctionIf anyone would like to recommend a better approach, it would be appreciated.