title: Parse custom datetime in Pig
body: <p>I have the following as string <code>"2014-12-15 18:20:48"</code> but when I parsed to datetime:</p>
  
  <pre><code>A = LOAD 'input.txt' AS (mydate:chararray);
  B = FOREACH A GENERATE ToDate(mydate) as datetime;
  </code></pre>
  
  <p>I get this error: <code>"2014-12-15 18:20:48" is malformed at " 18:20:48"</code>
  Alternatively, when I specify the format <code>ToDate(mydate, 'yyyy-MM-dd HH:mm:ss');</code> the datetime is converted to <code>"2014-12-15T18:20:48.000Z"</code> instead of <code>"2014-12-15 18:20:48"</code>. How can I resolve this to give me <code>"2014-12-15 18:20:48"</code> type datetime?</p>