+ Reply to Thread
Results 1 to 4 of 4

extraction of the year from a date variable

  1. #1
    Registered User
    Join Date
    02-19-2014
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    24

    extraction of the year from a date variable

    Hello,

    I would like to extract the year from a date variable, with the function =Year(date variable) but this does not work! knowing that the cell of the date variable has a date format

    I don't know the reason! please help me

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: extraction of the year from a date variable

    If your date is something like 7/15/2014 in A2, use =TEXT(A2,"yyyy") and you should get 2014 from it.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    02-19-2014
    Location
    Switzerland
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: extraction of the year from a date variable

    GREAT! Thank you so much sambo, your reply works well

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,501

    Re: extraction of the year from a date variable

    Great! Glad I could help. Don't forget to mark your post as solved. And since you're new to the forum, if you feel anyone was helpful you can click on the "* Add Reputation" below their posts as that is how we advance in this forum.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  2. [SOLVED] Count days for specific year falling within in multi-year date range
    By jslo2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2012, 05:58 PM
  3. Replies: 3
    Last Post: 08-14-2012, 05:14 AM
  4. Replies: 3
    Last Post: 07-05-2012, 01:49 AM
  5. Number extraction from variable strings
    By SFFliberte in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2009, 09:44 PM

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