Answer the question
In order to leave comments, you need to log in
C# uniform date format?
I'm new to C#, please advise where you can read about changing the time format.
Well, let's say in Russian language Windows dd / mm / yyyy, and in American mm / dd / yyyy
I wonder if it's possible to somehow set a single date format for the entire application ....
If possible, explain how for a teapot with examples and pictures ))) ), if not, then at least with the documentation (which is impossible to read) and with explanations.
Thanks
Answer the question
In order to leave comments, you need to log in
For .NET <= 4.5.2
using System.Threading;
using System.Globalization;
//code
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
using System.Globalization;
//code
CultureInfo.CurrentCulture = CultureInfo.InvariantCulture;
https://msdn.microsoft.com/ru-ru/library/system.gl... There is such a thing. Actually, at the start of your application, you can assign any custom culture to it. Or use some specific locale like ru-ru.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question