Days and months name in french

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

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.

1 Like