Parsing a complicated string as DateTime

c#, datetime, datetime-format

Solution

        string s = "11:50:46 AM on Wednesday, October 19, 2011";
        DateTime dateTime = DateTime.ParseExact(s, 
            "hh:mm:ss tt on dddd, MMMM dd, yyyy", CultureInfo.InvariantCulture);

Problem

Can someone tell me how should I approach converting the following format to a proper `DateTime` object? ``` 11:50:46 AM on Wednesday, October 19, 2011 ```

Original source