Changing from text to date

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

Guest

Hi again everyone!!

I am importing a text file into Access, with one of the fields being a
date/time that needs to be formatted as follows: mm/dd/yyyy. Because i am
importing it as text, Access does n;t recognize it as a date and refuses to
display it properly (whether it is a query, report or table) - I try to
change the "format" in the properties section of all three areas - and to no
avail....can someone please help?

Much thanks, in advance!
Victoria
 
You must import to a date field, or use the CDATE Function

Pieter
 
Thanks Peter:

Actually, when I attempt to import it as text, it is coming over with the
whole column as "Error!" - I am unfamiliar with the CDATE function - can you
give me insight?
 
How is the data stored in the field text field?
say for instance: 20061231 can't be directly interpretted as a date
You can however use DateSerial + Some text mainipulating Function
for My Sample "TheDate" Assumed as the field Name:
DateSerial(Left([TheDate],4),Mid([TheDate],5,2,Right([TheDate],2)) - Will
return the date 12/31/2006

HTH
--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/
 

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

Back
Top