I have a process which grabs the birthdate and from a data table and display them in a masked text box for viewing and editing
However when pushing the data into the textbox any preceding zeros get removed
For example 05/05/2005 would display as 55/20/05__
The masked Text box is set up as 00/00/0000
The line which assigns the code is:
MaskedTextBox.Text = Format(DataTable(0)("DOB"), “MM/dd/yyyy”).ToString
To date I have tried the following:
- Delete and re-add the control
- Copy masked textbox from another form in the same program
- Above Masked textbox grabs the same information from the same database table and is formatted exactly the same and it works
- Tried various different formats including no format all with the same result
Does anyone have any other suggestions?