How to remove the seconds from DatetimePicker ????
-
I using datetimepicker and when i get the value that the user was choose i get the time with seconds. This field is read only and i can do "get" but i cant do "set". My problem is that i want to drop this seconds and i don't know how. I try to avoid of create new DateTime object and with i parser this object to set the seconds to be "00". Thanks.
-
I using datetimepicker and when i get the value that the user was choose i get the time with seconds. This field is read only and i can do "get" but i cant do "set". My problem is that i want to drop this seconds and i don't know how. I try to avoid of create new DateTime object and with i parser this object to set the seconds to be "00". Thanks.
Use a CustomFormat.
-
I using datetimepicker and when i get the value that the user was choose i get the time with seconds. This field is read only and i can do "get" but i cant do "set". My problem is that i want to drop this seconds and i don't know how. I try to avoid of create new DateTime object and with i parser this object to set the seconds to be "00". Thanks.
It depends on the specific control, but generally the format would be somthing like hh:mm....the default is hh:mm:ss, so drop the ss for dropping the seconds from displaying.
-
It depends on the specific control, but generally the format would be somthing like hh:mm....the default is hh:mm:ss, so drop the ss for dropping the seconds from displaying.
-
I already done it. But still, when i do this: DateTime t = DatetimePicker.Value; ==> the t.seconds is not 0. I need that the t.seconds will be always 0.