There is always trouble with dateformats.
I have come to this practice:
- for client input in forms i don't use <input type="text">, but either a calendar (date-picker) or some dropdown boxes.
- at the server, when communicating with the database, i use dateformat yyyy/mm/dd (because that will be interpreted by all databases correctly.
Main Topics
Browse All Topics





by: Makr_Watson27Posted on 2004-03-24 at 00:18:03ID: 10665210
There really is no quick and easy answer to your problem, however if you can be certain that your users will only enter in the form of dd-mm-yyyy then you can convert that into a Access Date Format of mm-dd-yyyy by using the following:
ateControl s/Home.asp x
dateFrom = Request.Form("dateFrom")
convertedDateFrom = "#" & Mid(dateFrom, 4,2) & "-" & Left(dateFrom, 2) & "-" & Right(dateFrom, 4) & "#"
If however you cannot be certain of date formats being entered by the user then have a look at the following .NET date control
http://www.peterblum.com/D