title: Date format conversion from "yyyy-mm-dd" to "dd/mm/yyyy" in pentaho using javascript
body: <p>I have a csv file where the date field has a format "yyyy-mm-dd" and I wish to convert it into "dd/mm/yyyy" using javascript. This is the javascript it found out from this <a href="http://forums.pentaho.com/showthread.php?59838-Modified-JavaScript-str2date" rel="nofollow noreferrer">reference</a> </p>
  
  <pre><code>"could not apply the given format yyyy/mm/dd on the string for 2015-02-04 :Format.parseObject(String) failed(script#3)"
  </code></pre>
  
  <p>this is the javascript code I used </p>
  
  <pre><code>var dateObj = str2date(Date_of_joining, "yyyy/mm/dd");
   var newDate = date2str(dateObj, "dd/MM/yyyy");
  </code></pre>
  
  <p>I even tried using Select Value step and changed the meta data to date and specified the format to "dd/MM/yyyy" but still not working.How do I solve this</p>
  
  <p><a href="https://i.stack.imgur.com/tKa0L.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tKa0L.jpg" alt="This is the error I got after using select value step"></a></p>