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.

Solved Solved
0 7 1,822
1 ACCEPTED SOLUTION

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.

View solution in original post

7 REPLIES 7

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.

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

BOTFORCE
Participant V

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.

sorry,

got it - now it works!
Thx.
Robert

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

BOTFORCE
Participant V

Hi,

Thatโ€™s what I did:

3X_f_a_fa231b2ede900cbc3f1fdcdc9996b0f0d992a2d8.png

but got an Invalid Format exception:

3X_3_3_33077e2e26b3bb6f5adffb13a627582f7f7fe8c7.png

Thx.
Robert

Top Labels in this Space