Do date conversion C # [duplicate]

0

I have a date "Wed, Nov 25" and would like to convert it to 2015-11-25 How could I do that?

    
asked by anonymous 25.11.2015 / 13:42

1 answer

0
string strData = "qua, nov 25, 2015";
CultureInfo provider = CultureInfo.GetCultureInfo("pt");
string formato = "ddd, MMM dd, yyyy";
DateTime data = new DateTime();
DateTime.TryParseExact(strData, formato, provider, DateTimeStyles.None, out data);
    
25.11.2015 / 13:53