Error formatting dates

I just created a new WinApp project and add a DTPicker,  2 text Control, 3 labels, a Button and this code :

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Label3.Text = Format(DateAdd(DateInterval.Day, Val(TextBox1.Text), dtpicker1.value), "dd/mm/yyyy")

End Sub

That’s all !!

When it executes and, for example, add 10 days from today, 11/18/2005, it retrieves 07/28/2005. It’s a Bug

Charlie




Answer this question

Error formatting dates