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? Code: 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 Between Dates Subroutine") For A = 1 To 5 Console.WriteLine(" ") Next Console.WriteLine("Enter the beginning date (xx/xx/xxxx): ") BeginningDate = Console.ReadLine() Console.WriteLine("Enter the ending date (xx/xx/xxxx): ") BeginningDate = Console.ReadLine() Console.WriteLine(DateDiff("d", EndingDate, BeginningDate) & msg)