It is just weird and gives me a headache. I looked through my code and I do not see any logical errors causing it.
Any other date set for my DateDime variable of my Date of birth in my class works when I add it as a value in my conn.AddParam, but when I send back 1/1/0001 12:00:00 AM (which was sent setting it to MinValue) in the SQL 2008 date field, it is still the default value that I set to null in the database for this field:
conn.AddParam("@birthDate", birthDate);
Date of birth - type DateTime. It is set to DateTime.MinValue; I don’t understand why it won’t take it.
source
share