View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default return the 2 diget year value

This will work whether your 1997-11-23 date is a real Excel date or a text
string (it works for either because of the format you used... year, month,
day ordering with dashes between them)...

=TEXT(E1,"yy")

Note that this returns your 2-digit year as a text string (in order to
preserve leading zeroes); if you really want this as a number (for use in
calculation as an example), then use this instead...

=--TEXT(E1,"yy")

but be aware that for 2008 it will return 8 as the response.

--
Rick (MVP - Excel)


"EngelseBoer" wrote in message
...
more correctly

1997-11-23
returns 97

"EngelseBoer" wrote:

how can i return the yy value of a date please

ie 1996 returns 96