Date in french

Hi everyone,

Is there a way to get the date in french ?
Thanks in advance

Hi @Livier
What do you mean - where? Can you provide a screenshot, so we can understand the context?

I had problems with correctly formatting dates in an earlier version. In the end, I used a 2nd column with the correctly formatted date for display.
It might be possible for you to use this for french dates by having an extra column with the date in french. It would mean using SQL though. This is the syntax for MS SQL Server. I'm sure others do something similar:

SET LANGUAGE French

SELECT  "Orders"."OrderID" AS "OrderID", "Orders"."RequiredDate" AS "RequiredDate", CONVERT(VARCHAR(12),"Orders"."RequiredDate",107)
FROM "Orders" 

This gives:
image

Hi @flamber and thank you for your answer.
AndrewMBaines’s screenshot is a perfect example of what I’d like

@AndrewMBaines Thank you very much. I’ll give it a try.

I get an error while using “SET LANGUAGE French”

java.sql.SQLException: Unknown system variable ‘LANGUAGE’

Are you using MS SQL Server? I’m using SQL 2017, but I think it works in earlier versions.
Try
select * from sys.syslanguages
to see the choices.
If not, it will depend upon your database.

Hi @Livier,

If you are using a recent version, have a look in the formatting options (available at three levels : general, dataset, and question). You will not have french month names, but playing with the date parts order and a abbreviated month, I can get something approaching : 25 Mar. 2019

Best regards from Niort,

Fabrice Etanchaud

Hi @AndrewMBaines,
Thanks for your answer
I get this message

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table ‘sys.syslanguages’ doesn’t exist

Hi @fetanchaud,

Thanks for your answer but if it’s possible, I’d like to get french date.
I’m acutally using the v0.31.2.

Best regards from Reunion Island :sunny:

@Livier
On MySQL/MariaDB, you need to set system variable - example:

SET lc_time_names = 'fr_FR';

https://dev.mysql.com/doc/refman/8.0/en/locale-support.html

@flamber
In my mySQL request, when I add this line, I get :

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘select date from order WHERE date = (SELECT MAX(date) FROM order)’ at line 4

@Livier
Actually I don’t think Metabase support multiple queries, so you need to define the system variable in your my.ini configuration or via “Additional JDBC connection string options” in the Metabase database settings:

sessionVariables=lc_time_names='fr_FR'

Thanks I’ll try it
I use centos 7. I’ll try to modify the my.cnf file