Extract month and year

Iโ€™m trying to extract month and year from a date.
I found one that does month.

is it possible to do month and Year?
i tried to extract year only but test returns no result.
INDEX(

LIST(
โ€œ2019โ€, โ€œ2020โ€, โ€œ2021โ€, โ€œ2022โ€, โ€œ2023โ€, โ€œ2024โ€,
โ€œ2025โ€, โ€œ2026โ€, โ€œ2027โ€, โ€œ2028โ€, โ€œ2029โ€, โ€œ2030โ€
),
YEAR(TODAY())
)

Solved Solved
0 10 3,896
1 ACCEPTED SOLUTION

Try:

TEXT([Date], "MMMM YYYY")

View solution in original post

10 REPLIES 10

Bahbus
New Member

Just YEAR(TODAY())

What do you actually want to do with this formula? Do you want to find where this 2020 is in the list?

If date is listed as 1-9-2020.

I want to extract January 2020

MONTH(โ€œ1/9/2020โ€) returns 1.
YEAR(โ€œ1/9/2020โ€) returns 2020.

The article you linked to shows how to use MONTH, LIST, and INDEX to change the 1 into โ€œJanโ€. You can copy that and change it to full month names. You donโ€™t need to do anything fancy for the year.

CONCATENATE( 
    INDEX(  
        LIST("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ),  
        MONTH([Date])
    ),
    " ",
    YEAR([Date])
)

That should get you most of the way there, youโ€™ll just need to make some minor tweaks.

thank youโ€ฆworks

Thanks this works fineโ€ฆ

Try:

TEXT([Date], "MMMM YYYY")

Oh yeah, I forgot that we recently got this feature.

wowโ€ฆthis one makes me feel really stupid.
you out it in such a simple way and of course working.

It shouldnโ€™t. This is a pretty new feature and youโ€™d have to be paying very close attention to have discovered it.

Top Labels in this Space