Help

Re: Days and months name in french

1916 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Clement_Rethore
4 - Data Explorer
4 - Data Explorer

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"
))))))))))))
4 Replies 4

Hi @Clement_Rethore and welcome to the community.

Thanks for your formulas, 2 suggestions:

  • Use WEEKDAY(), it’s easier.
  • Use 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.

Perfect ! It’s better like that…

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!

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"
)

image