Have read a number of posts about this issue but haven't found anything that works.
Our SQL database has the field set up like so (Data Type of datetime
)
The respective model property has the following declarations
[DisplayName("Effective Date")]
[Column(TypeName = "DateTime")]
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true)]
public DateTime? EffectiveDate { get; set; }
Yet if I enter a date of 11/11/1111
I get the following error when my program runs DbContext.SaveChanges()
The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. The statement has been terminated
I am not aware of, nor have found, any range specifications in our ASP MVC project or on the SQL table. Any help greatly appreciated.