0

I thought by setting up the custom format of date time picker to |MM/dd/yy hh:mm tt" would work, but the selection doesn't change from date picker only! I need an object that I can be able to choose both date and time.

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by AngelicOne
0

..., but the selection doesn't change from date picker only! I need an object that I can be able to choose both date and time.

Can you please elaborate this issue a bit precisly?

and this works:

DateTime date = dateTimePicker1.Value;
string strDate = String.Format("{0:MM/dd/yy hh:mm tt}", date);

thx,
Mitja

Edited by Mitja Bonca: n/a

0

You can use this, but then you can only select time
timePicker.Format = DateTimePickerFormat.Time;

0

I think I've done it. I set showupanddown to true and I can set now the time and date using an up and down scroll.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.