+ Reply to Thread
Results 1 to 8 of 8

extract date and current year

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,765

    extract date and current year

    I have dates in col B (format dd/mm/yyyy) and the current date in E1


    I want to extract the day and month from Col B and the year from E1 in Col C, but cannot get it to work

    I have should what the end result should look like in Col D

    it would be appreciated if someone could assist me
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,427

    Re: extract date and current year

    This is what you need:

    =DATE(YEAR(E1),MONTH(B4),DAY(B4))

    Or this:

    =DATE(YEAR(TODAY()),MONTH(B4),DAY(B4))
    Last edited by AliGW; 05-29-2019 at 10:02 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,923

    Re: extract date and current year

    Try

    =DATE(YEAR($E$1),MONTH(B4),DAY(B4))

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,812

    Re: extract date and current year

    You can use this in D4:

    =DATE(YEAR(TODAY()),MONTH(B4),DAY(B4))

    then copy down.

    Hope this helps.

    Pete

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,923

    Re: extract date and current year

    Or try

    =EDATE(B4,(YEAR($E$1)-YEAR(B4))*12)

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: extract date and current year

    Please try this depend on your region setting

    =--TEXT(B4,"d/m")
    or
    =--TEXT(B4,"m/d")

    and format to date
    Leave year blank will take current year.

  7. #7
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: extract date and current year

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  8. #8
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,765

    Re: extract date and current year

    thanks for the help guys

+ 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: 4
    Last Post: 06-27-2015, 01:51 AM
  2. Current year date doesn't come up
    By PennyPA in forum Excel General
    Replies: 5
    Last Post: 03-07-2015, 07:42 PM
  3. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  4. [SOLVED] How to get monthname and year of the current date?
    By siobeh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2014, 05:05 PM
  5. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  6. [SOLVED] Need Calculation - If A1=Annual, Anniv. Date for Current Year, else Biennial Date
    By TaxAnnihilator in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-11-2013, 06:06 PM
  7. [SOLVED] Keeping a date as current year, even though formula determines previous year
    By dropanddrive03 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 08:31 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