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