Date and time picker control

B

Brian

I have a VB macro that allows a user to choose a date with DT picker 6.0 and
then inserts this value in the user form. I would like to only enter the
date that is chosen(not the time). Is there a way to not include the time
stamp using this control?
 
R

Rick Rothstein

What are you doing that you are getting both the date and time from this control? When I use the Value property of the DTPicker control, and it is set to one of the time formats, I only get the date returned. What properties did you change and what code are you using? You need to show us something so we can duplicate what you are seeing.
 
B

Brian

I think I already managed to sort it out. I was initializing to the current
date when the form opened with Now () which was setting current time as well.
I changed this to Int(Now()) and that seems to have done the trick
throughout.

Thanks anyway.
 
R

Rick Rothstein

In VBA, instead of using Int(Now()), you could use the Date() function which is like Now(), but without the time part.
 

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

Top