Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Date conversion

  1. #1
    Join Date
    Dec 2016

    Default Date conversion

    Can anyone provide me help on the below ?
    First i have a string FEB-17, need to convert into date in PDI, how i can do this, the result would be date like 20170201.

    i tried with java script var outDate = new Date (01-FEB-17); but this does not give me output and give result like 1970/01/01 and TimeStamp

    Second: I have String like InputDateString = 20170224, than i have to implement oracle function last_day(add_months(InputDateString ,-1)) + 1

    Output of above two need to do the comparison First_OutPut < Second_OutPut

    Thanks in advance for your help....

  2. #2
    Join Date
    Jun 2012


    You want to know the first day of the month given as a partial date?
    The date parser will assume day 1 for format MMM-yy.

    You want to know the first day of the month for any full date?
    Step Calculator supports Date calculations.

    There are different ways to compare field values depending on what you intend to do with the result.
    If you want to split a stream you can use Filter-Rows.
    If the result is needed as a field itself a User-Defined-Java-Expression is helpful.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2016


    Many Thanks solve my problem

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.