View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default return the 2 diget year value

Assuming the date is a true Excel date:

A1 = 1997-11-23

=MOD(YEAR(A1),100)

Custom format as 00

That returns the year as a numeric value but note that any leading zeros are
for *display purposes only*. If the date in A1 was 2008-9-12 the result will
*display* as 08 but as far as Excel is concerned the result is 8.

If you don't need a numeric value as the result this returns a *text string*
:

=RIGHT(YEAR(A1),2)

--
Biff
Microsoft Excel MVP


"EngelseBoer" wrote in message
...
how can i return the yy value of a date please

ie 1996 returns 96