You can use the DateDiff function to get the difference between two dates. You'll need two date objects however. Here is an example:
Dim firstDate As Date = Now
Dim secondDate As Date = Now
MsgBox(DateDiff(DateInterval.Day, firstDate, secondDate))</pre>If your dates are in the form of a string then you can convert them using date.parse. The next example demonstates this.<pre> Dim firstdate As Date = Today
Dim secondDate As Date = Date.Parse("12/25/2006")
MsgBox(DateDiff(DateInterval.Day, firstDate, secondDate))</pre>
Enter your message below
Sign in or Join us (it's free).