Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Using DateAdd: Cannot convert?

  1. #1

    Default Using DateAdd: Cannot convert?

    Hello all,

    Here I am again with a question that most likely has a high 'duh'-factor.

    I have the following line in my Javascript transformation:

    Code:
    last_day = dateAdd(first_day.getDate(), "d", nr_of_days.getNumber())
    first_day is a date value, which is calculated in an earlier step.

    Now, I get the following error:

    org.mozilla.javascript.EvaluatorException: Cannot convert 2009/08/03 00:00:00.000 to java.util.Date (script#12)
    (this code is located at line 12 of the script)

    I can't see what's going wrong here. Even more: I don't see why Kettle wants to transform the date; it is already a date datatype.

    Can somebody tell me how to solve this?

    Thanks in advance!

    Gr.

    Rick

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Do you have lazy conversion turned on in the source step for that data?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.