Hi community…
How can I create column that record month name with existing year from the date column which set in my app?
Thank you in advance.
I believe you’ll need to use a Virtual Column to construct the date format you are looking for with these two functions and a CONCATENATE() expression.
TEXT([Date Column], "MMMM YYYY")
Awesome! I didn’t realize those format strings were available there.
I think they were introduced only a few weeks ago.
Interesting! I wasn’t aware of this either. Since the date names are in English, I wonder what one needs to do to in other languages. @Fouad_H_Saad1, if you want to have the dates written in Arabic or another language, perhaps the following expression I made for my app will be useful to you:
concatenate(
ifs(
MONTH([Began])=1,"January",
MONTH([Began])=2,"February",
MONTH([Began])=3,"March",
MONTH([Began])=4,"April",
MONTH([Began])=5,"May",
MONTH([Began])=6,"June",
MONTH([Began])=7,"July",
MONTH([Began])=8,"August",
MONTH([Began])=9,"September",
MONTH([Began])=10,"October",
MONTH([Began])=11,"November",
MONTH([Began])=12,"December"
)
," ",day([Began]),", ",year([Began]),", ",TEXT([Began], "H:MM AM/PM")
)
Note: [Began] is the name of a column with the date and time that something began in my app.
Thanks a lot. Day by day I find this community is wonderful.
Thanks a lot, I appreciate your efforts. It is solved.
@Fouad_H_Saad1
Though your problem has been swiftly solved by @Kirk_Masden, just wanted to make a sweet touch to the expression:
CONCATENATE(
SWITCH(
MONTH([Began]),
1,"January",
2,"February",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
"December"
)," ",
DAY([Began]),", ",YEAR([Began]),", ",TEXT([Began], "H:MM AM/PM")
)
Thanks a lot. I think this expression will be very useful to switch date. But I wanted to create date field that record just month and year, and I found this in (@Kirk_Masden ) reply.
I think I made the expression with IFS() before I had learned about SWITCH(). Thanks!
Or:
CONCATENATE(
SWITCH(
MONTH([Began]),
1,"January",
2,"February",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
"December"
),
TEXT([Began], " D, YYYY, H:MM AM/PM")
)
User | Count |
---|---|
39 | |
28 | |
24 | |
23 | |
13 |