![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 1
|
Hello, I am importing information from an american file. This file has american dates (mm/dd/yy) and I would like to convert this to the european date (dd/mm/yy).
How should I do this? Thanks!!! |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,388
|
Would this work for you? Try the formula
=TEXT(A2,"dd/mm/yy") Modify for cell(s) of interest. |
|
|
|
|
|
#3 |
|
New Member
Join Date: May 2002
Location: Leicester, UK
Posts: 40
|
Hi jorgiev
The previous method will only work if Excel is still 'seeing' the entries as a date data type, in which case you would only need to change the column format to 'DD/MM/YY' from 'MM/DD/YY'. If importing your data via the text imput wizrd you should be 'tell' excel that this cvolumn has a date data type and what format it is in step 3 of the wizard. If the data is coming in as text then there are two methods, one which gives a text result and one which gives a date result: For a 'Text' result (Assuming the target is always 8 character text string): =DATE(INT("20"&RIGHT(A29,2)),INT(LEFT(A29,2)),INT(MID(A29,4,2))) This will work for all dates. For a 'Date' result (Again, assuming an 8 char text string): = =DATE(INT("20"&RIGHT(A29,2)),INT(LEFT(A29,2)),INT(MID(A29,4,2))). This will only work for dates post 2000 onwards but you can alter it for 1900 dates (change "20" dor "19" , but you will need to seperate the two types out and use a different formula for each) Cheers JayKay |
|
|
|
|
|
#4 |
|
New Member
Join Date: May 2002
Location: Leicester, UK
Posts: 40
|
Sorry the first formula should have been:
= MID(A29,4,2) & "/" & LEFT(A29,2) & "/" & RIGHT(A29,2) Both formula assume your data starts in cell A29. JayKay |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|