ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I change the date format when importing a txt file? (https://www.excelbanter.com/excel-worksheet-functions/57643-how-do-i-change-date-format-when-importing-txt-file.html)

vpuckett

How do I change the date format when importing a txt file?
 
My import data imports as yyyy/mm/dd even when I tell it to import m/d/y.
When I try to format the column using format cells, custom, mm/dd/yyyy, I get
###########. I tried to change width of column as was suggested in help, but
that does not work. I know I have done this before, but it escapes me now.

Gary''s Student

How do I change the date format when importing a txt file?
 
Just import as pure raw text and then use:

=DATE(LEFT(A1,4)*1,MID(A1,6,2)*1,RIGHT(A1,2)*1)

this will convert 2005/12/25
into 12/25/2005 as a real usable date

--
Gary's Student


"vpuckett" wrote:

My import data imports as yyyy/mm/dd even when I tell it to import m/d/y.
When I try to format the column using format cells, custom, mm/dd/yyyy, I get
###########. I tried to change width of column as was suggested in help, but
that does not work. I know I have done this before, but it escapes me now.


Peo Sjoblom

How do I change the date format when importing a txt file?
 
The whole point when using the text to columns is to import as the format it
comes in and excel will convert it according to your regional settings so if
you get text files with dates like YMD then use YMD in the text to columns
wizard (step 3)and it should be OK


--

Regards,

Peo Sjoblom


"vpuckett" wrote in message
...
My import data imports as yyyy/mm/dd even when I tell it to import m/d/y.
When I try to format the column using format cells, custom, mm/dd/yyyy, I

get
###########. I tried to change width of column as was suggested in help,

but
that does not work. I know I have done this before, but it escapes me

now.




All times are GMT +1. The time now is 04:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com