I am implementing search functionality in WinForms and I search by date range. Thus there are dateForm and dateTo date pickers on the form. By default their values are date
Put a check box next to each datetime picker, and use the check box to enable/disable the datetime picker.
So if the datetimepicker is disabled, you know the user do not want to specify the datetime.