0

my date format in sql server is yyyy/MM/dd enter image description here

and when I check the table data on c# the date format is MM/dd/yyyy enter image description here

and when i run the code, i always encounter this error. enter image description here

but when i set the value for BirthDate to NULL, the program runs smoothly. help please.

makeitclear
  • 23
  • 1
  • 2
  • is you changed something in `table` OR `SP` during that time – wiretext Jul 26 '15 at 05:56
  • 5
    [Sql server does not store date with display format.](http://stackoverflow.com/questions/30032915/how-to-cast-the-datetime-to-time) neither does c#. check the dataset design. – Zohar Peled Jul 26 '15 at 05:58
  • 2
    The error message doesn't state specifically that the problem is date formats. See [here](http://stackoverflow.com/a/7029713/2091410) for more information about the `ConstraintException`. – Ed Gibbs Jul 26 '15 at 06:02

0 Answers0