Can anybody assist me in fixing this code to return the number of days
idfference
DateDiff("d", Date.Now, CDate(FILEMOVEDATE))
FILEMOVEDATE = '05/07/2007'
i was expecting a return of 2 but get a return of 1 instead, any suggstions.
Joergen Bech <jbech<NOSPAM>@ - 03 Jul 2007 10:16 GMT
No problems. That is the correct value.
Maybe the code below might ring a few bells:
---snip---
Dim dnow As Date = Date.Now
Dim dfuture As New Date(2007, 7, 5)
Dim span As TimeSpan = dfuture.Subtract(dnow)
MsgBox(span.Days.ToString)
MsgBox(span.Hours.ToString)
MsgBox(span.Minutes.ToString)
MsgBox(span.TotalDays.ToString("0.00"))
MsgBox(span.TotalHours.ToString("0.00"))
MsgBox(span.TotalMinutes.ToString("0.00"))
---snip---
Regards,
Joergen Bech
>Can anybody assist me in fixing this code to return the number of days
>idfference
[quoted text clipped - 4 lines]
>
>i was expecting a return of 2 but get a return of 1 instead, any suggstions.