Daily Archives: October 20, 2011

.Net Parse DateTime from String

I’m always forgetting the exact way to parse a DateTime from a String, so I’ll put it down in writing here so I can easily find it next time:
// E.g. 13 Jan 2010 15:30:01:123
DateTime.ParseExact(dateString, "dd MMM yyyy HH:mm:ss:fff", CultureInfo.CreateSpecificCulture("en-GB"))

For the format string see MSDN Custom Date and Time Format Strings

Underdressed but unwilling to give in

Last night the temperature on the ride home ranged from 6 degrees celsius down to 5 degrees celsius, now starting off in shorts and t-shirt with mitts it felt cold, but I thought, no probs, I’ll warm up.
Two miles from home (16 miles in) the cold eat into me with the temperature at 5 degrees celsius by this point, I was tired and the wind felt icy cold. I pulled over for a snack to give me a little energy, but I didn’t give much thought to the cold being the reason I was feeling tired.
I had a jersey in my bag, a gilet, a shirt, trousers, socks, the kitchen sink, everything I need to keep warm. Next time I’ll throw the jersey on when I feel like that even if I over heat afterwards.

This morning I was prepared for the near freezing temperature, I had finger gloves, gilet and a baselayer on – not cold enough for tights yet, so still in shorts. I was much more comfortable to say the least.

So don’t go underdressed for the weather and for goodness sake wrap up if you feel cold and tired.