Inhumanoid,
This will work.....
Code:Dim myDate, dateElements, theDate myDate = "2001/6/22/17/30/24" dateElements = Split(myDate, "/") theDate = FormatDateTime(dateElements(1) & "/" & dateElements(2) & "/" & _ dateElements(0) & " " & dateElements(3) & ":" & _ dateElements(4) & ":" & dateElements(5), 0) MsgBox DateDiff("s", theDate, Now) 'Difference in Seconds MsgBox DateDiff("n", theDate, Now) 'Difference in Minutes MsgBox DateDiff("h", theDate, Now) 'Difference in Hours MsgBox DateDiff("ww", theDate, Now) 'Difference by Week of Year MsgBox DateDiff("w", theDate, Now) 'Difference by Weekday MsgBox DateDiff("d", theDate, Now) 'Difference in Days MsgBox DateDiff("y", theDate, Now) 'Difference by Day of Year MsgBox DateDiff("w", theDate, Now) 'Difference in Weekday MsgBox DateDiff("q", theDate, Now) 'Difference in Quarters MsgBox DateDiff("yyyy", theDate, Now) 'Difference in Years![]()
Tanner


Reply With Quote
