5
Answers

Pass datetime string from xml

mike Delvotti

mike Delvotti

11y
3.6k
1
what would be the best way to pass the time value stored in an xml element into a datetime picker?

for instance, the below line throws an error as it doesn't like the format:

dateTimePicker1.Value = DateTime.ParseExact(person.Date, "HH:mm", null);
(person.date is my xml element it's reading from) the time is stored in the element as such: HH:mm

Answers (5)