datetime picker return type, changing time 
Author Message
 datetime picker return type, changing time

I would like to be able to use the datetime picker to
select times. - like 8 PM etc

I selected time as the format property in the properties
page and the time of the day shows in the combo like box.
If I click I end up with a calendar date selection. Is
there a way to chnage this behavior to select times like
the control suggests

2.) dateTimePicker1_ValueChanged(object sender..
    I tried assigning sender to a DateTime object
instance, but that failed. When I look at the values in
debug mode they appear the same. Any ideas here ?
It says I cannot implicitly convert an object to
system.DateTime.  I typed in the command line
 ? sender.GetType()  and alot got printed out - but I
don't know what to do with that info. Thanks


Wed, 12 Jan 2005 06:58:36 GMT  
 datetime picker return type, changing time


Thank you for using the Microsoft Newsgroups.

If you want to change the time in the DateTimePicker control, you can edit
the value in the textbox directly. If you don't want the end user to change
the date, you can set the ShowUpDown property to true.

To read the control's value in the ValueChanged event, you can read the
value property directly, the code looks like:

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
    End Sub

If you have any questions, please reply to this post.


Jian-Wei Yu
Microsoft Support

This posting is provided "AS IS" with no warranties, and confers no rights.

Fri, 14 Jan 2005 10:11:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Crystal reports not returning time from Sybase datetime fields

2. Changing datetime type from SQL sp

3. Date/Time picker changes size

4. Date Time Picker Change Event

5. Change internation datetime to regular datetime

6. MSCOMCT2.OCX and DateTime Picker control problem

7. Help: DateTime Picker

8. DateTime Picker BorderStyle

9. DateTime Picker

10. Another problem with the DateTime picker

11. Datetime picker control in VB5

12. DateTime Picker control


Powered by phpBB® Forum Software