Converting date time

how do i convert

     7/12/2000 3:11:36 PM                    to               07-12-2000
     or
     10/25/2000 2:02:29 PM                  to               10-25-2000

the basic requirements being 10 characters and dashes as dividers

using access 2000 at the moment and preferring a Query

thanks!
intsupAsked:
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.

Rey Obrero (Capricorn1)Commented:


         format(#7/12/2000 3:11:36 PM#,"mm-dd-yyyy")


0
Paul_Harris_FusionCommented:
If your date is stored as a DateTime then

Select Format(mycolumn, "dd-mm-yyyy") as DateString From myTable

If your date is currently stored as a string you could try converting it to a string first using CDate then using Format to render it as a string

Select Format( CDate(mycolumn), "dd-mm-yyyy") as DateString From myTable
0
Dale FyeCommented:
Format(#7/12/2000 3:11:36 PM#, "mm-dd-yyyy")
0
Rey Obrero (Capricorn1)Commented:
or using your field name

 format([dateField],"mm-dd-yyyy")

take note that this will return a text string not date
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
Microsoft Access

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.