date problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

have a text field that contains dates how do I turn into date format?

eg

from 26.05.05 to 26/05/2005

I tried

datecorrect = Format([dateimp],"dd/mm/yyyy")

dateimp = 26.05.05

thanks in advance
 
Hi Trever

Assuming you have a date format of dd/mm/yy in your computer locale
settings, this should work:

CDate( Replace( [dateimp], ".", "/" )

Replace changes the dots to slashes and CDate converts the result to a
date/time data type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Stumped By Dates 4
Date formats 1
convert date 1
date calculations - please help 2
Date problem 5
Syntax Error 4
date format 3
Mail Merge Date Format 9

Back
Top