To Assign the NULL value to datetime you can be able to use the NULLABLE type for that and then you can able to assign it
Nullable<DateTime> _myDateTime;
will work, you should be able to set it to null
Check for nulls:
if (object.myDateTime != null)
or
if (object.myDateTime.HasValue)
Use its Value property, like so:
DateTime? dt = DateTime.Now; //
DateTime? dt = null;
or
Check if the value you are inserting is null. If so then insert null value like this.
if ((YourDateTime.Text == "") )
{
YourDateTime.Text = DBNull.Value;
}