将字符串值添加到DateTimePicker

时间:2014-05-10 19:32:15

标签: vb.net

我有DateTimePicker自定义格式为" hh:mm:ss"。如何添加包含" 16:00:00"的值的字符串?这个DTP?

1 个答案:

答案 0 :(得分:0)

    Dim cnv As String = "16:54:06"  
    Dim CTime As DateTime = Convert.ToDateTime(cnv)
    MyDateTimePicker.Value = CTime