1: 2: 3: 4: 5: 6: 7:
public static DateTime? GetDateValue(DateTimePicker picker) { if (picker.Checked) return new DateTime(picker.Value.Year, picker.Value.Month, picker.Value.Day); else return null; }