• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

VB Date Time Control

Is there a control I can use to set the date and time?  That is only one control to set both the date and time.

I'm currently using the two DTPICKER control to allow my users to select the date and the specific time.

Thanks in advance...
1 Solution
I see where the DTPICKER allows for a Format of Long Date, Short Date, Time, and Custom.  I assume you are using one control with a format of Long Date, and another control with a format of Time.  (I can't be sure, I've never used the DTPICKER).

The format of Custom will allow you to have both a Date and Time in the control.  You just have to set the Format to Custom and the CustomFormat to "mm/dd/yyyy hh:mm:ss".
KnightWhoSaysNiAuthor Commented:
That does work to display the time and date, but it does not allow you to select the time and date.  

When the 'Format' property is set to Custom, the dropdown brings up the calendar, which allows you to select the date.

However, while I was working on a screenshot for you, I figured out something that will work.  If you set the 'Format' property to Custom and change the UpDown property to True, you can change the date and time.

Thanks for the help.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now