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())
)
Aleksi
January 8, 2020, 10:17pm
3
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.
3 Likes
Steve
January 9, 2020, 8:05pm
6
Try:
TEXT([Date], "MMMM YYYY")
13 Likes
Oh yeah, I forgot that we recently got this feature.
1 Like
Steve:
TEXT([Date], “MMMM YYYY”)
wow…this one makes me feel really stupid.
you out it in such a simple way and of course working.
Steve
January 12, 2020, 5:35pm
10
Roger_Dalomba:
this one makes me feel really stupid
It shouldn’t. This is a pretty new feature and you’d have to be paying very close attention to have discovered it.
2 Likes