Oct 30, 2019 01:57 AM
Create a Day column :
DATETIME_FORMAT(Date, "d")
Formula for days names :
IF(Day="1","Lundi",
IF(Day="2","Mardi",
IF(Day="3","Mercredi",
IF(Day="4","Jeudi",
IF(Day="5","Vendredi",
IF(Day="6","Samedi",
IF(Day="0","Dimanche","Erreur"
)))))))
Create a Month column :
DATETIME_FORMAT(Date, "M")
Formula for months names :
IF(Month="1","janvier",
IF(Month="2","février",
IF(Month="3","mars",
IF(Month="4","avril",
IF(Month="5","mai",
IF(Month="6","juin",
IF(Month="7","juillet",
IF(Month="8","août",
IF(Month="9","septembre",
IF(Month="10","octobre",
IF(Month="11","novembre",
IF(Month="12","décembre","Erreur"
))))))))))))
Oct 30, 2019 02:41 PM
Hi @Clement_Rethore and welcome to the community.
Thanks for your formulas, 2 suggestions:
WEEKDAY()
, it’s easier.SWITCH()
instead of several IFs.Will be shorter and more elegant:
SWITCH(
WEEKDAY(Date),
1,'Lundi',
2,'Mardi',
…,
'Erreur'
)
Oh, and use MONTH()
for the months.
Nov 25, 2019 07:07 AM
Perfect ! It’s better like that…
Oct 27, 2021 12:47 PM
Hi @Elias_Gomez_Sainz , can you give me hand with this?
I’m new to formula’s and trying to transform English months into Dutch ones… But it’s not working out.
I tried: SWITCH(MONTH({Month}), june, "juni")
and some variants, but nothing seems to work.
In another column, I already extracted the month from a complete date field using the DateTime_Format formula like this: DATETIME_FORMAT({Date}, 'MMMM')
So once I get the Switch formula going, I’d like to combine the 2 formula’s into 1 field to reduce clutter, if that’s possible at all.
Thanks in advance!
Oct 27, 2021 03:08 PM
An easier way to get the name of the month in Dutch is to use DATETIME_FORMAT
with the month unit specifier and set the locale.
DATETIME_FORMAT(
SET_LOCALE({Date}, "nl"),
"MMMM"
)