Thread: customize date
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default customize date

Hi,


With a date in A1 use this

=DAY(A1)&IF(OR(DAY(A1)={1,2,3,21,22,23,31}),CHOOSE (1*RIGHT(DAY(A1),1),"st
","nd ","rd "),"th ")&TEXT(A1,"mmmm, yyyy")

Mike

"enrico via OfficeKB.com" wrote:

i customized a cell with a now() date field so that it's date is always
updated. i also designed the cell and add a "th" word so that today would be
shown like this: 15th. what i miss is that the first to third day doesn't end
up with "th" but rather "st", "nd" and "rd" respectively. how will i
customize it that it will be flexible according to the date? (e.g. 1st, 2nd,
3rd, 4th, etc.)

--
Message posted via http://www.officekb.com