PC Review


Reply
Thread Tools Rate Thread

Date and time picker control

 
 
Brian
Guest
Posts: n/a
 
      2nd Dec 2008
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?
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      2nd Dec 2008
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.

--
Rick (MVP - Excel)


"Brian" <(E-Mail Removed)> wrote in message news:EDAEEB7E-006D-4F1D-BA67-(E-Mail Removed)...
>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?

 
Reply With Quote
 
Brian
Guest
Posts: n/a
 
      2nd Dec 2008
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.

"Rick Rothstein" wrote:

> 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.
>
> --
> Rick (MVP - Excel)
>
>
> "Brian" <(E-Mail Removed)> wrote in message news:EDAEEB7E-006D-4F1D-BA67-(E-Mail Removed)...
> >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?

>

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      2nd Dec 2008
In VBA, instead of using Int(Now()), you could use the Date() function which is like Now(), but without the time part.

--
Rick (MVP - Excel)


"Brian" <(E-Mail Removed)> wrote in message news:2AEA9038-DA6E-416F-B91C-(E-Mail Removed)...
>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.
>
> "Rick Rothstein" wrote:
>
>> 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.
>>
>> --
>> Rick (MVP - Excel)
>>
>>
>> "Brian" <(E-Mail Removed)> wrote in message news:EDAEEB7E-006D-4F1D-BA67-(E-Mail Removed)...
>> >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?

>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting current date on date/time picker control =?Utf-8?B?RG91Z00=?= Microsoft Access VBA Modules 1 19th Jul 2005 07:07 PM
I am trying to use the Microsoft Date and Time Picker control and I am getting the following error "an error occured in a call to the windows date and time picker control" in access 2000 Ralph Malph Microsoft Access Forms 0 25th Oct 2004 07:00 PM
MS Date and Time Picker Control defaults to today's date =?Utf-8?B?UmF2aQ==?= Microsoft Outlook VBA Programming 1 22nd Jan 2004 02:48 PM
Problem with Date & Time Picker control in a Tab Control form Mystery Microsoft Access Form Coding 0 2nd Aug 2003 11:43 AM
Problem with Date & Time Picker control in a Tab Control form Mystery Microsoft Access Forms 0 2nd Aug 2003 11:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:10 AM.