Datetimepicker
i know how to show time(hh:mm) in datetimepicker . but how can i set seconds and milli seconds in datetimepicker with showing auto incrementing seconds
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Munesh SharmaRank #174 · 13.9K reputationPosted Mar 20, 2014, 3:28 AM EDT
MessageBox.Show("The selected value is " +
dateTimePicker1.Text);
MessageBox.Show("The day of the week is " +
dateTimePicker1.Value.DayOfWeek.ToString());
MessageBox.Show("Millisecond is: " +
dateTimePicker1.Value.Millisecond.ToString());
VulpesRank #55 · 29.2K reputationPosted Mar 20, 2014, 3:54 AM EDT
To get it to autoincrement, you'll need to add a Timer control to the form, set its Interval property to 1000 and then put the following code in its Tick event handler: