lukie
lukie

Reputation: 21

Problem during parsing datetime

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.

Upvotes: 0

Views: 88

Answers (2)

annakata
annakata

Reputation: 75872

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.

Upvotes: 2

Matteo Mosca
Matteo Mosca

Reputation: 7458

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

Upvotes: 1

Related Questions