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.
 
Back
Top