Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default TEXT DATE Format Conversion

When I have a text file that I open in Excel, the field that brings in the
month is in text as "JAN-07" meaning January 2007. All of my period names
are in this format from the oracle output. Just so I can give you a few more
examples:
JAN-06 is supposed to be January 2006,
FEB-05 is supposed to be February 2005, and
DEC-99 is supposed to be December 1999.

I want to change the format of this field to something that will keep this
relationship because Excel automatically assumes that I want:
JAN-06 to be January 06, 2007,
FEB-05 to February 05, 2007, etc......

It uses the current year to complete the date. I am currently using
"[$-409]mmm-yy;@" as the format to change it to:
JAN-06 to be Jan-07,
FEB-05 to be Feb-07, etc....

Will someone please help me?

--
Ashish
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default TEXT DATE Format Conversion

If you have JAN-07 in A1 as text, then

=DATEVALUE("1/" & LEFT(A1,3) & "/20" & RIGHT( A1,2))

will give you a real date, you should format this cell as a date.
--
Gary's Student
gsnu200705


"Ashish_Vaidya" wrote:

When I have a text file that I open in Excel, the field that brings in the
month is in text as "JAN-07" meaning January 2007. All of my period names
are in this format from the oracle output. Just so I can give you a few more
examples:
JAN-06 is supposed to be January 2006,
FEB-05 is supposed to be February 2005, and
DEC-99 is supposed to be December 1999.

I want to change the format of this field to something that will keep this
relationship because Excel automatically assumes that I want:
JAN-06 to be January 06, 2007,
FEB-05 to February 05, 2007, etc......

It uses the current year to complete the date. I am currently using
"[$-409]mmm-yy;@" as the format to change it to:
JAN-06 to be Jan-07,
FEB-05 to be Feb-07, etc....

Will someone please help me?

--
Ashish

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
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
Text Date Conversion CPodd Excel Discussion (Misc queries) 9 May 9th 07 04:39 AM
Conversion of date into different format Fam via OfficeKB.com Excel Discussion (Misc queries) 8 July 31st 06 09:14 PM
Date format conversion Terry Pinnell Excel Discussion (Misc queries) 5 November 21st 05 07:53 PM
Date Format - Conversion tinkertoy Excel Discussion (Misc queries) 1 July 14th 05 06:24 PM


All times are GMT +1. The time now is 08:49 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"