sql datetime null with min value of sql datetime


Some time you will insert min value of datetime is system datetime like 01/01/0001 but in system datetime minvalue is not sql datetime min value that's way sql give this error :
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

this time to give sql datetime min value.

DateTime dt = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue;
sql datetime null with min value of sql datetime sql datetime null with min value of sql datetime Reviewed by Bhaumik Patel on 8:01 PM Rating: 5