Convert.ToDateTime (b) .ToString (); -> 1968/3/11 12:00:00 Monday morning
Global time using a piece of code using the format set in the program:
if (DateTimeFormatInfo.CurrentInfo != null) { var type = DateTimeFormatInfo.CurrentInfo.GetType(); var field = type.GetField("generalLongTimePattern", BindingFlags.NonPublic | BindingFlags.Instance); if (field != null) field.SetValue(DateTimeFormatInfo.CurrentInfo, "yyyy-MM-dd"); }
Before executing this code, or the global system configuration prior to use the code format of the time, will result in Convert.ToDateTime (b) .ToString () -> '2019-09-18'