Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chucky
 
Posts: n/a
Default In Excel, how can you format for 4 digit years (MM/DD/YYYY)?

I'm pulling in an unformatted 8-digit date field from an AS400 into an excel
spreadsheet. I would like to be able to format it in MM/DD/YYYY format in the
spreadsheet, but get weird numbers when I do so. I don't see anything in the
standard date formatting section and have created a Custom Format as
' / / ', but this will not work either.
  #2   Report Post  
Gary Rowe
 
Posts: n/a
Default

Chucky,
You'll need to use the date(year,month,day) function to convert to an excel
date. You can break down your data from the AS400 by using string functions.
Say the date is 02042005 in cell C7, then the formula would be
=DATE(RIGHT(C7,4),LEFT(C7,2),MID(C7,3,2)). You can then format it as you
wish.
Gary

"Chucky" wrote:

I'm pulling in an unformatted 8-digit date field from an AS400 into an excel
spreadsheet. I would like to be able to format it in MM/DD/YYYY format in the
spreadsheet, but get weird numbers when I do so. I don't see anything in the
standard date formatting section and have created a Custom Format as
' / / ', but this will not work either.

  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Chucky

Assuming your data is coming in like 20051231 or similar.

Try DataText to ColumnsNextNextColumn Data FormatDate and pick the
appropriate format then Finish.

You will have to then format the cells to your MM/DD/YYYY format.


Gord Dibben Excel MVP

On Wed, 19 Jan 2005 13:17:23 -0800, Chucky
wrote:

I'm pulling in an unformatted 8-digit date field from an AS400 into an excel
spreadsheet. I would like to be able to format it in MM/DD/YYYY format in the
spreadsheet, but get weird numbers when I do so. I don't see anything in the
standard date formatting section and have created a Custom Format as
' / / ', but this will not work either.


  #4   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Select the import, do datatext to columns, click next twice, select Date
under columns data format and from dropdown select the imported date format
so if it can look like 10122004 (10/12/2004) then select MDY and click finish


Regards,

Peo Sjoblom

"Chucky" wrote:

I'm pulling in an unformatted 8-digit date field from an AS400 into an excel
spreadsheet. I would like to be able to format it in MM/DD/YYYY format in the
spreadsheet, but get weird numbers when I do so. I don't see anything in the
standard date formatting section and have created a Custom Format as
' / / ', but this will not work either.

  #5   Report Post  
Gary Rowe
 
Posts: n/a
Default

Good tip Peo, I learned something new.
Gary

"Peo Sjoblom" wrote:

Select the import, do datatext to columns, click next twice, select Date
under columns data format and from dropdown select the imported date format
so if it can look like 10122004 (10/12/2004) then select MDY and click finish


Regards,

Peo Sjoblom

"Chucky" wrote:

I'm pulling in an unformatted 8-digit date field from an AS400 into an excel
spreadsheet. I would like to be able to format it in MM/DD/YYYY format in the
spreadsheet, but get weird numbers when I do so. I don't see anything in the
standard date formatting section and have created a Custom Format as
' / / ', but this will not work either.

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How do I change Excel format to pdf format? William Haskovec Excel Discussion (Misc queries) 1 January 13th 05 12:07 AM
Excel format changes as I merge into Word document How can I stop AngieDerbyshire Excel Discussion (Misc queries) 1 January 8th 05 12:19 AM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM
Import Indian Rupees as a number format in Excel Aditya Khandekar Excel Discussion (Misc queries) 2 December 6th 04 03:48 PM


All times are GMT +1. The time now is 10:52 PM.

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"