Formatting a date

brooken

New Member
Joined
Sep 5, 2002
Messages
2
I import data from an AS400, the AS400 uses a date format like 1020401 which equals 2002-04-01 (there way around the Y2K was to go from 99 to 100 instead of 00). How can i get excel to format this into a date that shows dd/mm/yy? Any help would be appreciated.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Assuming your date is 1st April (not 4th January) and is in cell A1:

=DATE(LEFT(A1,3)+1900,MID(A1,4,2),RIGHT(A1,2))

It will deal with 0990401 but not 990401 though. You could test the length of the string in that case.
 
Upvote 0
I use an AS400 system and drop information into Excel all the time. You can also highlight the column with the date (1020731)go to Data, Text to Columns, click Fixed Width, click next, parcel the data so the first 1 is separated from the rest of the date (1, 020731), click next, do not import the 1, and then format the rest of the date yy/mm/dd.

Usually, we do this when we are importing the data into Excel.
 
Upvote 0

Forum statistics

Threads
1,224,351
Messages
6,178,061
Members
452,822
Latest member
MtC

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top