on-internet
← Community

Handling date format in Pentaho using javascripting

Stack Overflow ·

My input excel sheet has field "date" with two different types of values as shown below 2015-03-02 11:06:35 3/2/2015 4:03:53 AM I am reading them as "string" and performing below logic var temp = date.getString(); temp = str2date(temp,"dd.MM.yyyy HH:mm:ss"); I get the below error *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* I tried reading them as "date" , but I got the below error Unparseable date: " 2015-03-02 11:06:35 " How can we handle this error?

Comments

Sign in or sign up to comment and upvote.

No comments yet.