Windows date time picker RRS feed

  • Question

  • Is there a way to set the display text of the windows date time picker control to blank if the result of data base query return NULL or empty. The issue I have is the date time picker defaults to current date if there is no date return by the SQL query but I want it to display no date if the query result is empty or null. I tried the following code but it doesnt work:


    DateTimePicker.Text.Equals(" ");


    It still displays current date. Anyone who have any suggestion to solve this issue, otherhrwise I'll have to use a text box control and write validation code as well.

    Thanks in advance.

    Monday, March 26, 2007 10:42 PM