Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hellow everybody!

I have a windows form.and also it has database.I add data to table(empattT).
there are 2 datetimepickers.one is use to add intime other one is used to add outtime.

In the database used datatype is datetime.

how am I only add time to that table using datetimepicker.

I didn't write any code for datetimepicker.

please help me
Posted

See this: http://www.functionx.com/vb/controls/timepicker.htm[^]

Only thing you have to do is convert it to C# :doh:

Regards...
 
Share this answer
 
v2
string myTime = dateTimePicker1.Value.ToShortTimeString();

this will do as well.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900