Answers for "c# parsing datetime from string irrespctive of culture"

C#
0

c# parsing datetime from string irrespctive of culture

CultureInfo.GetCultures(CultureTypes.AllCultures).Select(culture => {
    DateTime result;
    return DateTime.TryParse(
        "8 avril 2016 vendredi", 
        culture, 
        DateTimeStyles.None, 
        out result
    ) ? result : default(DateTime?);
})
.Where(d => d != null)
.GroupBy(d => d)
.OrderByDescending(g => g.Count())
.FirstOrDefault()
.Key
Posted by: Guest on August-19-2021

Code answers related to "c# parsing datetime from string irrespctive of culture"

C# Answers by Framework

Browse Popular Code Answers by Language