View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Date conversion on text file import

If A2 contains text looking like a date in mm/dd/yyyy then the
following formula will generate the date:

=DATE(--RIGHT(A2,4),--LEFT(A2,2),--MID(A2,4,2))

HTH
Kostis Vezerides

On Nov 11, 4:52*pm, Calmack wrote:
I am in the UK and I am trying to import a tab-delimited text file which
contains all dates in US date-time format, eg 03/14/2008 9:12:25 AM. *I
import the file into Excel and it goes through the wizard. *I set the date
field to MDY, but when I press Finish the dates appear either as a UK date
(when both month and day are less than/equal 12) or as text (when it cannot
convert). *I have tried it by editing the text file and separating date and
time with tabs before importing and that works. *But I don't want to have to
do editing like that.