Date in English version even on French installation?!

When i use Date, it returns me days in english, and the date in english too, as 06/20/2019?!

Even though i checked an other computer using French, it’s the same!

Is this normal?!

To output a date in the French format you can do
dateTime.ToString(CultureInfo.GetCultureInfo("fr-FR"))

2 Likes

Thank you @DanielMitchell

dateTime.ToString(CultureInfo.GetCultureInfo("fr-FR"))

It says that CultureInfo not declared.

Add “System.Globalization.” before CultureInfo

1 Like

Date.Now.DayOfWeek.ToString(System.Globalization.CultureInfo.GetCultureInfo(“fr-FR”))

Returns Thursday as result.

Should it return something else?

Yes, Thursday as Jeudi in french xD

:man_facepalming: duh

Date.Now.ToString("dddd",new CultureInfo("fr-FR")) prints “jeudi” for me.

1 Like

I’m newbie :grin:

So this one returns “jeudi”, after that i add “System.Globalization.” before GetCultureInfo.

Date.Now.ToString(“dddd”,new System.Globalization.CultureInfo(“fr-FR”))

Thank you @DanielMitchell

1 Like

You showed me more ways than i was expecting :+1::+1::+1:

Btw, how does work with you without “System.Globalization.” ?

If you’re using a namespace often you can import it into the project.
image

I have System.Globalization in my Studio so when I say CultureInfo it already knows where to find it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.