[RESOLVED] datediff function not working
I have a string called datestring which contains the string "23, 06, 2015"
I was trying to use the DateDiff and Parseexact function to find the number of days between today see if i could get the program to fetch the number of days between today (the 22nd) and the string, however it always produces -149 and i don't know why. Here's my code:
Dim tempdate as string = "23, 06, 2015"
Dim tempdate As Date = Date.ParseExact(teststring, "dd, mm, yyyy", System.Globalization.DateTimeFormatInfo.InvariantInfo)
RichTextBox1.Text = DateDiff("d", Date.Today, tempdate)
the rich textbox should be producing 1 but it always produces -149 and i don't know why
Re: datediff function not working
I think the problem is that mm refers to minutes. You want MM instead.