DateTimePicker - A date or a time, how to do both?

  • Thread starter Thread starter Robin Tucker
  • Start date Start date
R

Robin Tucker

I'm using the date/time picker to allow users to choose a date or a time.
However, as the control modes only allow one or the other, I'm scratching my
head as to how to allow the one control to allow both a date and a time
selection. Should I place 2 controls next to each other? I'm having
trouble with screen real-estate. Perhaps there is a single control that
will allow this?

Thanks


Robin
 
Robin,

Robin Tucker said:
I'm using the date/time picker to allow users to choose a date or a time.
However, as the control modes only allow one or the other, I'm scratching
my head as to how to allow the one control to allow both a date and a time
selection-

Set the datetimepicker's 'Format' property to 'Custom' and assign a custom
format to its 'CustomFormat' property.

..NET Framework Developer's Guide -- Standard DateTime Format Strings
<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconstandarddatetimeformatstrings.asp>

..NET Framework Developer's Guide -- Custom DateTime Format Strings
<URL:http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcustomdatetimeformatstrings.asp>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top