New Posts New Posts RSS Feed: Displaying Time
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Displaying Time

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Displaying Time
    Posted: 06-Jun-2008 at 12:39pm
I have a datetime field in my SQL Server Table called StartTime.  When I display the field on a form, I just want to display the time portion of the field in a DateTimePicker?  The user can change the start time and then I want to save it back to the table. 
 
How do I bind this field to my form so that only the time displays?
 
Bill
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 06-Jun-2008 at 3:37pm
Right-click the ControlBindingManager, and choose "Configure DataBinding".  Change the Data Converter for StartTime to DateConverter (1 of three possible choices).  Set the Format String in the DateConverter Properties menu to "T" or "t".
 
For more information on Format strings, see:
 
 
or
 
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down