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?!
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"))
Thank you @DanielMitchell
dateTime.ToString(CultureInfo.GetCultureInfo("fr-FR"))
It says that CultureInfo not declared.
Add “System.Globalization.” before CultureInfo
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
duh
Date.Now.ToString("dddd",new CultureInfo("fr-FR"))
prints “jeudi” for me.
I’m newbie
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
You showed me more ways than i was expecting
Btw, how does work with you without “System.Globalization.” ?
If you’re using a namespace often you can import it into the project.
I have System.Globalization in my Studio so when I say CultureInfo it already knows where to find it.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.