Forum Discussion

milo1234's avatar
milo1234
Brass Contributor
May 27, 2021
Solved

Unable to extract month from date

Hi, I have used the correct formula =TEXT(I2, "mmm") however the month is not being extracted from the date. The start date column has a data type of 'Date' and the Month column has a data type of 'Custom' to "mmm". Please help? 

 

 

  • milo1234 

    Most probably Start Dates are texts which only looks like dates, not dates (which are actually numbers). The rest depends on which is default date format on your machine.

    As variant you may transform texts to dates with Data->Text to Columns selecting MDY on third step.

    Or

    =TEXT( DATE(2021, LEFT([@[Start Date]],2), 1), "mmm")

12 Replies

  • nguyenngo3's avatar
    nguyenngo3
    Copper Contributor

    milo1234 Stupid of Xcel didn't understand the leading of the cell is 'space'. Remove the space then it works

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    milo1234 

    Most probably Start Dates are texts which only looks like dates, not dates (which are actually numbers). The rest depends on which is default date format on your machine.

    As variant you may transform texts to dates with Data->Text to Columns selecting MDY on third step.

    Or

    =TEXT( DATE(2021, LEFT([@[Start Date]],2), 1), "mmm")
  • milo1234 

    Set the number format of the Month column to General.

    The values in the Start Date column are left-aligned. This makes me suspect that they are text values, not 'real' dates. What happens if you select (for example) I2, press F2 and then press Enter?

    • milo1234's avatar
      milo1234
      Brass Contributor
      Hi HansVogelaar
      I have changed the Month column to General and this does nothing.
      Also when I select I2 press F2 and press enter, nothing changes.

Resources