Format Date to dd/mm/yyyy

Hi

I am using Dreamweaver to create a recordet which retrieves data from an Access Database, the problem I am having is that the when the use enters the date in dd/mm/yyyy format no records are retrieved, it works fine when you use the American or the international format.  The Access database stores the date in dd/mm/yyyy format.

Below is the code Dreamweaver has generated, how i can format the date so it used the UK format.

<% Session.LCID = 2057 %> <!--UK regional settings -->
<%
Dim rsDetails__paramStartDt
rsDetails__paramStartDt = "01/10/2004"
If (request.form("txtStartDate")  <> "") Then
  rsDetails__paramStartDt = request.form("txtStartDate")
End If
%>
<%
Dim rsDetails
Dim rsDetails_numRows

Set rsDetails = Server.CreateObject("ADODB.Recordset")
rsDetails.ActiveConnection = MM_connCallScoring_STRING
rsDetails.Source = "select * from qryReturnOnWeb where DateCallTaken = #" + Replace(rsDetails__paramStartDt, "'", "''") + "#"
rsDetails.CursorType = 0
rsDetails.CursorLocation = 2
rsDetails.LockType = 1
rsDetails.Open()

rsDetails_numRows = 0
%>

PLEASE HELP
jkharodiaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ryan ChongCommented:
when do querying, try format your date into mm/dd/yyy format? like:

...
'User enter date in format dd/mm/yyyy

If (request.form("txtStartDate")  <> "") Then
  rsDetails__paramStartDt = request.form("txtStartDate")
End If
...

'Get date in mm/dd/yyyy format

...
mydate = mid(rsDetails__paramStartDt, 4,2) & "/" & left(rsDetails__paramStartDt, 2) & "/" & Right(rsDetails__paramStartDt, 4)
...

and then try:

...
rsDetails.Source = "select * from qryReturnOnWeb where DateCallTaken = #" + Replace(mydate , "'", "''") + "#"
...

Is this Works?
0
Ellis_JuanCommented:
Not completely sure I understand the question. But one option may be this: There are some free dreamweaver server behaviors you can download from the dreamweaver exchange that will allow you to do some advanced form validation that will require the user to enter a date in whichever format you specify.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.