I've got a form which requires date entry by a user. The value entered is checked on the 'post' page to ensure its a valid date. The format entered is always MM/DD/YYYY, including a leading 0 when the month is <10 (IE 06/01/2007). This works great...
...then I also have a form for the user to update this information. When the date is pulled back out of the SQL DB, the date format has dropped the leading zeros (IE 6/1/2007). In my current code, the user has to put the zeros back in before submitting any other changes, or my format check will reject the date format.
So my question: any way to force a specific date format with leading zeros into the SQL db?
Thanks!
...then I also have a form for the user to update this information. When the date is pulled back out of the SQL DB, the date format has dropped the leading zeros (IE 6/1/2007). In my current code, the user has to put the zeros back in before submitting any other changes, or my format check will reject the date format.
So my question: any way to force a specific date format with leading zeros into the SQL db?
Thanks!