I am trying to write a function to get the "Days between dates". The code I have (for a console application) is shown below. For some reason, it is not giving the correct number of days between dates. How do I get this to work correctly?
Dim BeginningDate As Date
Dim EndingDate As Date
Dim DaysBetweenDates = DateDiff(DateInterval.Day, EndingDate.Date, BeginningDate.Date)
Dim msg = String.Format(" days between dates.", DaysBetweenDates)
Console.WriteLine(" Days...
Getting the wrong number of days for days between dates
Dim BeginningDate As Date
Dim EndingDate As Date
Dim DaysBetweenDates = DateDiff(DateInterval.Day, EndingDate.Date, BeginningDate.Date)
Dim msg = String.Format(" days between dates.", DaysBetweenDates)
Console.WriteLine(" Days...
Getting the wrong number of days for days between dates