Date query in ASP

hi

I have an access database which stores date in dd/mm/yyyy format.  I am having problems retrieving data when i type this in my recordset.  I have read that this is a problem and that i have to use yyyy/mm/dd to retrieve.  How can i get the date the user types in (dd/mm/yyyy) to convert to yyyy/mm/dd before it is sent to the query.  

many thanks
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.

rockmansatticCommented:
these should get you started

http://www.tek-tips.com/viewthread.cfm?qid=933460

Rockman
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
Saqib KhanSenior DeveloperCommented:
Two Options, first Change the DataType of Date/Time Column to Text , then you will be able to see whatever user typed (Not Recomended)

2nd Would be, play around with formatDateTime Function to get what you need.

formatDateTime(Rs("TimeColumn"), 2)

OR1, 3, 4 as parameter....

Good Luck
0
webwomanCommented:
Access databases store dates as mm/dd/yyyy by default. You should use that format for queries, though just converting to a date may work.

Anything that's submitted through a form is a string. You'll have to convert it to a date. I would parse out the pieces and recombine them, then convert to date. You can try converting to a date directly and see if it's recognized. If you specify what format it is, it should work.

Not sure of the syntax, but it should be possible.

I wouldn't change the format in the database -- if you do, you can't sort by date, add/subtract dates, etc., or use ANY date functions directly.  
0
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.