Код: Выделить всё
10/10/2021 00:00:00У меня есть такой код:
Код: Выделить всё
bool first = DateTime.TryParse("10/10/2021 00:00:00",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out DateTime firstDate);
bool second = DateTime.TryParse("18/11/2021 23:59:59",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out DateTime secondDate);
Console.WriteLine(firstDate + " --- " + secondDate);
Код: Выделить всё
10/10/2021 12:00:00 AM --- 1/1/0001 12:00:00 AMПодробнее здесь: https://stackoverflow.com/questions/700 ... ame-format
Мобильная версия