Difference between two dates in Visual Basic
Posted on 2012-09-17
Trying to calculate the difference between two dates. I have tried to use DateDiff like follows: DateDiff("d", Now, StDate) where StDate = 9/22/2012. When I execute this in the immediate window[?SetWeek2(9/22/2012)] I get -41169. I also output the value of StDate. It is 12:00:18 AM. Apparently StDate is not being evaluated as 9/22/2012. I am sure this is something elementary. Thanks in advance for the help.