+ Reply to Thread
Results 1 to 7 of 7

extracting month, day and year

  1. #1
    Registered User
    Join Date
    07-22-2015
    Location
    Nairobi
    MS-Off Ver
    2007
    Posts
    19

    extracting month, day and year

    Dear Folks, I have a problem here,
    I have the following worksheet with a column of date from which i wish to separately extract, day, month and year; I applied the formula =month(date) and it returned 01/01/1900; what i was looking for is a single value; for jan=1 feb=2,... and for a day obtain 1,2 ... Help identify the problem. Additionally, i have tried to use the icon for attachment for posting the excel worksheet but the icon does not work, or how do I attach the relevant worksheet in this forum?
    Date month
    02/01/2009
    05/01/2009
    06/01/2009
    07/01/2009
    08/01/2009
    09/01/2009
    12/01/2009
    13/01/2009
    14/01/2009
    15/01/2009
    16/01/2009
    19/01/2009
    20/01/2009
    21/01/2009
    22/01/2009
    23/01/2009

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: extracting month, day and year

    Try

    Data in column A

    in B2

    =DAY(A2)

    in C2

    =MONTH(A2)

    in D2

    =YEAR(A2)

    Copy down columns

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: extracting month, day and year

    Your formula for the month is correct. You just need to format the result as General or Number.

    For the day and year:

    =DAY(A1)

    =YEAR(A1)

    Format both of these as General or Number.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: extracting month, day and year

    or:
    =TEXT(A1,"d") for number of day or =TEXT(A1,"dddd") for a name of day
    =TEXT(A1,"mmm") for short name of month or =TEXT(A1,"mmmm") for long name of month
    =TEXT(A1,"yyyy") for full year
    Last edited by sandy666; 04-07-2016 at 11:46 AM. Reason: typo

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: extracting month, day and year

    Enter formula in B2 and copy across and down

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


    v A B C D
    1 Date Day Month Year
    2 1/2/2009 2 1 2009
    3 1/5/2009 5 1 2009
    4 1/6/2009 6 1 2009
    5 1/7/2009 7 1 2009
    6 1/8/2009 8 1 2009
    7 1/9/2009 9 1 2009
    8 1/12/2009 12 1 2009
    9 1/13/2009 13 1 2009
    10 1/14/2009 14 1 2009
    11 1/15/2009 15 1 2009
    12 1/16/2009 16 1 2009
    13 1/19/2009 19 1 2009
    14 1/20/2009 20 1 2009
    15 1/21/2009 21 1 2009
    16 1/22/2009 22 1 2009
    17 1/23/2009 23 1 2009
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    07-22-2015
    Location
    Nairobi
    MS-Off Ver
    2007
    Posts
    19

    Re: extracting month, day and year

    Thanks Valko, it worked, be blessed

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: extracting month, day and year

    You're welcome. Thanks for the feedback!

+ 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. Extracting Month and Year from Date
    By aquinn_21 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2016, 06:37 PM
  2. Running Totals from 24 hours to month, month to year without year decreasing
    By Safetyintern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2015, 01:13 PM
  3. Extracting Month/Year from a Date
    By skillsguy in forum Excel General
    Replies: 4
    Last Post: 01-01-2015, 09:37 PM
  4. Graphing dates by month/year with 2 bars per month/year
    By Ellpoyohlokoh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 05-22-2014, 05:25 AM
  5. Replies: 3
    Last Post: 09-04-2013, 10:49 AM
  6. Replies: 4
    Last Post: 05-31-2013, 11:20 AM
  7. If Column A Month and Year = ColumnB Todays Month and Year then send email
    By HACCStaff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-15-2013, 12:47 AM

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