• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

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