Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Reformat a date imported from another program

I export data from another program into Excel. This data contains dates
which are formatted like this: yyyymmdd000000. When the data is imported
into Excel, the date shows in the cell like #.#####E+13. The formula bar
shows the date as it appears in the original program (yyyymmdd000000). How
can this date format be converted to mm/dd/yyyy or another date format which
excludes extraneous zeros?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Reformat a date imported from another program

=DATE(LEFT(A1,4),MID(A1,5,2),MID(A1,7,2))
--
** John C **

"Heather" wrote:

I export data from another program into Excel. This data contains dates
which are formatted like this: yyyymmdd000000. When the data is imported
into Excel, the date shows in the cell like #.#####E+13. The formula bar
shows the date as it appears in the original program (yyyymmdd000000). How
can this date format be converted to mm/dd/yyyy or another date format which
excludes extraneous zeros?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Reformat a date imported from another program

Problem is the data are imported as numbers. Since the format has 14
digits no information is lost. I don;t know of a format to hide least
significant digits of integers but you can construct a date in another
column with the following formula (assume first date in A2)

=DATE(--LEFT(A2,4),--MID(A2,5,2),--MID(A2,7,2))

Note that you can ensure that the full imported string will be
displayed with either of the following Number Formats for the dates
column:

1. You can format the column as Text.
2. You can apply a custom Number Format of "00000000000000" (i.e. 14
zeros)

HTH
Kostis Vezerides

On Nov 13, 8:53*pm, Heather wrote:
I export data from another program into Excel. *This data contains dates
which are formatted like this: yyyymmdd000000. *When the data is imported
into Excel, the date shows in the cell like #.#####E+13. *The formula bar
shows the date as it appears in the original program (yyyymmdd000000). *How
can this date format be converted to mm/dd/yyyy or another date format which
excludes extraneous zeros?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Reformat a date imported from another program

Another one:
=--TEXT(LEFT(A1,8),"0000\-00\-00")

And format the cell as a date.

=text() will return a string. The -- stuff converts that text date to a real
number. Reformatting makes it look pretty.

Heather wrote:

I export data from another program into Excel. This data contains dates
which are formatted like this: yyyymmdd000000. When the data is imported
into Excel, the date shows in the cell like #.#####E+13. The formula bar
shows the date as it appears in the original program (yyyymmdd000000). How
can this date format be converted to mm/dd/yyyy or another date format which
excludes extraneous zeros?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I reformat a 6-digit date to general & look the same? jean Excel Discussion (Misc queries) 0 September 12th 08 03:35 AM
Copy pasting and reformat Date whatzzup Excel Discussion (Misc queries) 2 April 28th 08 08:45 PM
reformat cells for date Wackyracer Excel Discussion (Misc queries) 12 April 3rd 08 12:42 AM
Imported Date Format Lee New Users to Excel 3 February 20th 08 05:52 AM
Date from imported file CaroleO Excel Discussion (Misc queries) 1 February 28th 07 09:35 PM


All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"