Convert a date to a Month/year

I am storing a date DD/MM/YYYY but I would like to store this in another field as MM/YYYY so I can group/count values by month. Is this possible, what would be the best way to do this. I am constantly adding new dates so it need to be dynamic. Thanks.

Please try expression in the MonthYear column something like

TEXT([Your Input Date Column], “MM/YYYY”)

Assumes [Input date column] has dates in DD/MM/YYYY format.

4 Likes

Thank you. The expression is working. I created a virtual column to store this data.

2 Likes

Can I also store this as a Date (MM/YYYY) so I can asscending this by date?
Thx Robert

Hi @Robert

If this is just for displaying purpose, you may want to use a virtual column (button “add a virtual column”)
and you can set any format you need: “yy/mmmm”, “yy mmmm”, “mm yy”, “mm/yy”…and so on.

3 Likes

Aurelien:

yy/mmmm

Hi,

That’s what I did:

but got an Invalid Format exception:

Thx.
Robert

sorry,

got it - now it works!
Thx.
Robert

2 Likes

@Robert
Great you had it.
I just noticed the Column type was incorrect: Date instead of Text

2 Likes