An Interesting Thing about DateTime.Parse…

So this morning I was stumbling through some code, trying to get a particular thing working that was comparing two objects. For whatever reason, it kept failing. It turns out that DateTime.Parse will only really go as far down as seconds, not milliseconds. This means that if you have a string that contains hours, minutes, seconds, milliseconds/ticks/whatever other small measurements, the DateTime.Parse will only grab out the hours, minutes, and seconds. It won’t parse out the milliseconds/ticks.

EDIT: Ok, I lied – it wasn’t really that interesting, but still good to know. 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s