View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pierre Pierre is offline
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