0

i'm new to MVC. How do i compare two variables of DateTime? Do I convert both to string then compare them or use == or .Equals()?

  • _Never_ compare `DateTime` values with their string representation. Because they might generate different representations in different cultures. – Soner Gönül Jul 28 '15 at 06:24
  • just convert it into string for example `DT1.ToString(String Format) == DT2.ToString(String Format)` – kulotskie Jul 28 '15 at 06:25

0 Answers0