Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Safe conversion from arbitrary string to DateTime

Does anybody know of a library that can handle strings pf various formats and conver them to a DateTime value? The strings are coming from a webform and I can't restrict the input (it's not my form).

I have been using Convert.ToDateTime but it choked on "12:00 noon".

I am looking for a function that can make sense out of anything that looks like a date/time. Outlook is pretty good at it when you enter an appointment with the GUI, but it doesn't expose this functionality via API.

Wednesday, May 4, 2005

*  Recent Topics

*  Fog Creek Home