title: Handling date format in Pentaho using javascripting
body: <p>My input excel sheet has field "date" with two different types of values as shown below</p>
  
  <pre><code>2015-03-02 11:06:35
  
  3/2/2015  4:03:53 AM
  </code></pre>
  
  <p>I am reading them as "string" and performing below logic</p>
  
  <pre><code>var temp =  date.getString();
  temp = str2date(temp,"dd.MM.yyyy HH:mm:ss");
  </code></pre>
  
  <p>I get the below error</p>
  
  <pre><code>*Could not apply the given format dd.MM.yyyy HH:mm:ss on the string for  2015-03-02 11:06:35  : Format.parseObject(String) failed*
  </code></pre>
  
  <p>I tried reading them as "date" , but I got the below error</p>
  
  <pre><code>Unparseable date: " 2015-03-02 11:06:35 "
  </code></pre>
  
  <p>How can we handle this error?</p>