views:

28

answers:

2

Hi, I have problem when im trying parse datetime in format like: "1.00:29:00" 1- days,29-minutes, after invoke DateTime.Parse im getting "String was not recognized as a valid DateTime"

thanks in advance for any suggestion.

+1  A: 

You can use ParseExact providing the format to use along with the value to parse.

Matteo Mosca
TryParseExact if you don't want to throw exceptions.
Adam
This is not a datetime string, so ParseExact will not work
Panagiotis Kanavos
+2  A: 

That's not a valid native datetime string format - see the remarks section here for more info - but that sounds a lot like you're really talking about a TimeSpan.

annakata