Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: pass yyyy-MM-dd formatted date to PID

  1. #1
    Join Date
    Oct 2017
    Posts
    5

    Default pass yyyy-MM-dd formatted date to PID

    I have a simple PDI which accepts a parameter. Then I grabs this parameter with 'Get Variables' step and format it to yyyy-MM-dd. For now I am just outputting this date with Select Values. PDI is working as expected.

    When I calls this transformation from Report Designer it throws an error. I have created a date parameter in PRD with
    • Name - executeDate
    • Label - Execute Date
    • Value Type - Date
    • Data Format - yyyy-MM-dd
    • Timezone - Use Server timezone
    • Display Type - date Picker



    If I create just a textbox and type in a date, all works fine...

    I am suspecting that date is not formatting in specified format.

    I am on pentaho 7.1 (PDI and PRD)

    Any help!!!

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

    Default

    PDI Parameters are, by definition, strings.
    Try changing the Value Type to String.

  3. #3
    Join Date
    Oct 2017
    Posts
    5

    Default

    In that case I will not have calendar/date picker.

    This can cause inconsistent date format...

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

    Default

    You could use a hidden parameter with a formula along the lines of
    =TEXT(dateparam;"yyyy-MM-dd")

    Then pass this hidden parameter to PDI

Tags for this Thread

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.