totime issue

totime issue


I bring in a string in the format MM-DD-YYYY 00:00:01 example 03-08-2009 00:00:01. I do some manipulation and then finally convert the string back to date time so I can use it and it converts it to 08-03-2009 00:00:01. It has reversed the month and day but when I use it it treats it as Month 8 and Day 3 so it looks up the wrong data.

Please help.