I have a date field that I want to use a Text Box or Masked Text Box to enter the date in the format mm/dd/yyyy. I'm currently using a Masked Text Box and I can enter the date 07/18/2008. The date in the SQL Table is 7/18/2008. That's what I want. The Mask on this field is 00/00/0000. However when the record with the date is recalled and displayed on form, the date is displayed in the format 71/82/008.
I give up. What is the best way to enter a date in the format mm/dd/yyyy and display it in the format mm/dd/yyyy. I tried formatting the date string manually and setting it in the Form_Load event, but the data doesn't seem to be available for this event.
Why does VB.net have to hurt so much. The formatting seems totally different from every other MS package I have used!
HEEEEEEEEEEEEEEEEEEEEEEEELP
Don't know how do you get the value from the SQL and add it to the masked text box but the right format is MM/dd/yyyy.
If you set it manually it will work for shure.
Ex:
Me.MaskedTextBox1.Text = Now.Date.ToString("MM/dd/y