Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Looking for custom date format

One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.

Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?

Thanks for any ideas.

Pierre

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Looking for custom date format

One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.

Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410

B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)

Rick
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Looking for custom date format

On Jun 20, 9:33 am, "Rick Rothstein \(MVP - VB\)"
wrote:
One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.


Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410

B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)

Rick


Rick, thanks for the reply, still not behaving though. Using the above
formula, 10510 returns Jan-05, instead of Oct-05. . .have played with
the fields, still not doing it.

Do you know of a custom date format method, instead of an additional
cell reference? It would save having to change the fields and
resulting data.

Thanks for your help.

Pierre

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Looking for custom date format

How would a date like April 1999 look like?
If all dates you want to convert are after 12/31/1999 you can use

=DATE(2000+MID(A1,2,2),RIGHT(A1,2),1)

if not post back


note that there are no dates in Excel without days so I put the first day of
the month there, so 10510 will be October 1st 2005, to just get the year
month use custom formatting like


mmm-yy




--
Regards,

Peo Sjoblom



"Pierre" wrote in message
oups.com...
On Jun 20, 9:33 am, "Rick Rothstein \(MVP - VB\)"
wrote:
One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.


Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410

B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)

Rick


Rick, thanks for the reply, still not behaving though. Using the above
formula, 10510 returns Jan-05, instead of Oct-05. . .have played with
the fields, still not doing it.

Do you know of a custom date format method, instead of an additional
cell reference? It would save having to change the fields and
resulting data.

Thanks for your help.

Pierre



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Looking for custom date format

One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.


Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410

B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)

Rick


Rick, thanks for the reply, still not behaving though. Using the above
formula, 10510 returns Jan-05, instead of Oct-05. . .have played with
the fields, still not doing it.


Whoops! I copied the wrong "test" formula from my worksheet. Try this
formula instead...

=TEXT(DATE(100,RIGHT(A8,2),1),"mmm-")&MID(A8,2,2)

Do you know of a custom date format method, instead of an additional
cell reference? It would save having to change the fields and
resulting data.


I don't see how... your "date number" needs would need to be manipulated
before the Excel could consider it a date that could be formatted.

Rick



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Looking for custom date format

On Jun 20, 10:10 am, "Rick Rothstein \(MVP - VB\)"
wrote:
One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.


Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410


B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)


Rick


Rick, thanks for the reply, still not behaving though. Using the above
formula, 10510 returns Jan-05, instead of Oct-05. . .have played with
the fields, still not doing it.


Whoops! I copied the wrong "test" formula from my worksheet. Try this
formula instead...

=TEXT(DATE(100,RIGHT(A8,2),1),"mmm-")&MID(A8,2,2)

Do you know of a custom date format method, instead of an additional
cell reference? It would save having to change the fields and
resulting data.


I don't see how... your "date number" needs would need to be manipulated
before the Excel could consider it a date that could be formatted.

Rick- Hide quoted text -

- Show quoted text -


Rick, the sql data which gets extracted appears in certain cells, and
I'd like to leave those cells as the data display sensitive cells,
without adding another row or column to extract the date-text-date
format.

Thanks for the 2nd pass on your formula, b t w. Regards.

Pierre


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Looking for custom date format

Rick, the sql data which gets extracted appears in certain cells, and
I'd like to leave those cells as the data display sensitive cells,
without adding another row or column to extract the date-text-date
format.


I have a possible idea for a macro function which could toggle the display
back and forth between you number format and the month-year format, but I
would need to know what those "certain cells" are. Are they fixed in number
(count)? How many of them are there? Are the contiguous?


Thanks for the 2nd pass on your formula, b t w. Regards.


Yeah, but I would go with either Peo's or Teethless mama's as they are
tighter.


Rick

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Looking for custom date format

Try this:

=TEXT(RIGHT(A1,2)&"-1","mmm-")&MID(A1,2,2)


"Rick Rothstein (MVP - VB)" wrote:

One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.

Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


A1: 10410

B1: =TEXT(RIGHT(A1,2),"mmm-")&MID(A1,2,2)

Rick

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Looking for custom date format

=TEXT(DATE(2000+MID(A1,3,1),RIGHT(A1,2),1),"mmm-yy")


"Pierre" wrote:

One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.

Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?

Thanks for any ideas.

Pierre


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default Looking for custom date format

On Jun 20, 9:40 am, Teethless mama
wrote:
=TEXT(DATE(2000+MID(A1,3,1),RIGHT(A1,2),1),"mmm-yy")



"Pierre" wrote:
One of our databases churns out a 5 digit date such as 10410 is
October 2004. The 1st 3 characters indicate the year (e.g., 107 is
2007, 106 is 2006, etc) and the last 2 characters indicate the month.


Is there a custom date format that would make it easier to read, and
have the result appear to be:
Apr-07, or the like?


Thanks for any ideas.


Pierre- Hide quoted text -


- Show quoted text -


Thanks TM

Pierre



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
Custom Date & Time format MSwan1 Excel Worksheet Functions 3 October 18th 05 08:11 PM
Date Format in Custom Header Radsri- Excel Discussion (Misc queries) 2 September 7th 05 03:57 PM
Custom format date bach New Users to Excel 5 August 30th 05 01:43 AM
Custom Date format ie. 01.01.05 W1 (W1 is week 1) aspen Excel Discussion (Misc queries) 3 December 29th 04 04:23 AM
How to write a "Text" or date custom format FBB Excel Worksheet Functions 1 November 28th 04 01:10 AM


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