+ Reply to Thread
Results 1 to 3 of 3

How to format a date into a 2-digit code which indicates the year?

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    Vaasa, Finland
    MS-Off Ver
    Excel 2007
    Posts
    2

    How to format a date into a 2-digit code which indicates the year?

    Hi.

    I'm new here, so I don't know whether this question is already answered before. I need to format a date (for example 13.10.2009) into a code that indicates the year i.e. two last characters (for example 09).

    The problem is that excel always turns them into number (40099 in this example) when I try to use any functions. So how is it possible to turn it into a form 13102009, which is not in a date format? After that I know that using the RIGHT function I can get the the last digits out. But I'm not able to do so before the format is changed, since it's in a date format and the result from the function is 99 in this case.

    So please let me know how to format 13.10.2009 (date format) into 13102009 (general or number format) instead of 40099. Thanks for help.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: How to format a date into a 2-digit code which indicates the year?

    Use

    =Right(year(A1),2)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-05-2012
    Location
    Vaasa, Finland
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: How to format a date into a 2-digit code which indicates the year?

    Yes, it works perfectly with a minor change when , is replaced with ; Thank you very much, you saved me a lot of time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1