Hi
Dim dob As DateTime
dob = CType(Year(txtdob.Text) & "-" & Month(txtdob.Text) & "-" & Day(txtdob.Text), Date)
if txtdob.text="09/02/2011" --- above code is working fine.
if txtdob.text="9/22/2011" --- above code is showing error: ex = {"Conversion from string "9/22/2011" to type 'Date' is not valid."}
Why and how to over come from this.
2nd question is:
And i need to know how to format it like: yyyy-MM-dd ?