TimSweet220
asked on
Check Date formats before updating database
What is the best way to check for formatting of dates in a vb form before it get send to the db?
I was considering the text change on the field, but not sure that's the best way.
Code sample would be great.
Thanks in advance.
Tim
I was considering the text change on the field, but not sure that's the best way.
Code sample would be great.
Thanks in advance.
Tim
the universally accepted date format is yyyy/mm/dd, i would recommend you use that format
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
do you want to check the format or check the date is valid?
you could just check it is valid and then strip it into the format you want:
If IsDate(strDate) then
//Do something
Else
//not valid date
End If
Apresto