Convert columns from yyyymmdd (text) to dd/mm/yyyy (date)

  • Thread starter Thread starter owainT
  • Start date Start date
O

owainT

Hi

At the moment I'm trying to move some data from our company mainframe
to a SQL 2000 database. I've been given a delimited file which I put
into Excel before using DTS to import into sequel. However, all dates
in the CSV are stored as yyyymmdd and as a text format in excel. I've
searched these forums for answers on how to convert these fields to a
dd/mm/yyyy format, but I couldn't get any suggestions to work properly.
(It doesn't really matter if excel changes it to a string of
'dd/mm/yyyy' as opposed to a date field long as it's in that format.

I'd be really grateful for any help.

Cheers

Owain
 
You could try this:

If A1 equals the cell with yyyymmdd then goto cell B1 and enter:

=RIGHT(A1,2)&"/"&MID(A1,5,2)&"/"&LEFT(A1,4)

Dan.
 
one way:

Select the column. Choose Data/Text to Columns. Click Next,
Next, and select the ymd option from the Date dropdown. Click Finish.

Format the dates as you like.
 
Back
Top