I am unable to set the set the Datetimepicker to Null, how can do it. In my project my requirement is to validate the DTPif it is a null, for that I need to set to Null, The code I am using is:
{
dateInsert.Format = DateTimePickerFormat.Custom;
dateInsert.Text = string.Empty;
}
Use the following code:
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = " ";