I have a string = '11/6/2014 '. I want to convert it to a DateTime
DateTime dt = DateTime.parse('11/6/2014');
this causes an error, so I run the code below and it does work:
DateTime dt = DateTime.parse('11/6/2014 12:00 AM');
What i get is '11/6/2014 7:00 AM' - so I am assuming that it takes the time zone into account when parsing.
I want it to convert to '11/6/2014 12:00 AM' - e.g. to ignore any time zone issues.
How do I do this? Bonus question: Is there a way to convert a time string, '11:15 AM' into a DateTime variable that stores it as '1/1/1900 11:15 AM' (date doesn't matter - but I want to preserve time as presented).