Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Getting proper date value from Excel

  1. #1
    Join Date
    Sep 2006
    Posts
    16

    Unhappy Getting proper date value from Excel

    Hi Every body,

    I am having a problem in solving one thing. That is, i am having a xls file which contains startdate and enddate as fields. Now i need to get the startdate and enddate according to the todays date range.

    example:

    Input XLS

    startdate enddate
    01-Jan-2007 07-Jan-2007
    08-Jan-2007 14-Jan-2007
    15-Jan-2007 21-Jan-2007
    22-Jan-2007 28-Jan-2007
    29-Jan-2007 31-Jan-2007
    01-Feb-2007 04-Feb-2007
    05-Feb-2007 11-Feb-2007
    12-Feb-2007 18-Feb-2007
    19-Feb-2007 25-Feb-2007
    26-Feb-2007 28-Feb-2007
    01-Mar-2007 04-Mar-2007
    05-Mar-2007 11-Mar-2007
    12-Mar-2007 18-Mar-2007
    19-Mar-2007 25-Mar-2007
    26-Mar-2007 31-Mar-2007
    01-Apr-2007 01-Apr-2007
    02-Apr-2007 08-Apr-2007
    09-Apr-2007 15-Apr-2007
    16-Apr-2007 22-Apr-2007
    23-Apr-2007 29-Apr-2007
    30-Apr-2007 30-Apr-2007
    01-May-2007 06-May-2007
    07-May-2007 13-May-2007
    14-May-2007 20-May-2007
    21-May-2007 27-May-2007
    28-May-2007 31-May-2007
    01-Jun-2007 03-Jun-2007
    04-Jun-2007 10-Jun-2007
    11-Jun-2007 17-Jun-2007
    18-Jun-2007 24-Jun-2007
    25-Jun-2007 30-Jun-2007
    01-Jul-2007 01-Jul-2007
    02-Jul-2007 08-Jul-2007
    09-Jul-2007 15-Jul-2007
    16-Jul-2007 22-Jul-2007
    23-Jul-2007 29-Jul-2007
    30-Jul-2007 31-Jul-2007
    01-Aug-2007 05-Aug-2007
    06-Aug-2007 12-Aug-2007
    13-Aug-2007 19-Aug-2007
    20-Aug-2007 26-Aug-2007
    27-Aug-2007 31-Aug-2007
    01-Sep-2007 02-Sep-2007
    03-Sep-2007 09-Sep-2007
    10-Sep-2007 16-Sep-2007
    17-Sep-2007 23-Sep-2007
    24-Sep-2007 30-Sep-2007
    01-Oct-2007 07-Oct-2007
    08-Oct-2007 14-Oct-2007
    15-Oct-2007 21-Oct-2007
    22-Oct-2007 28-Oct-2007
    29-Oct-2007 31-Oct-2007
    01-Nov-2007 04-Nov-2007
    05-Nov-2007 11-Nov-2007
    12-Nov-2007 18-Nov-2007
    19-Nov-2007 25-Nov-2007
    26-Nov-2007 30-Nov-2007
    01-Dec-2007 02-Dec-2007
    03-Dec-2007 09-Dec-2007
    10-Dec-2007 16-Dec-2007
    17-Dec-2007 23-Dec-2007
    24-Dec-2007 30-Dec-2007
    31-Dec-2007 31-Dec-2007

    so now todays date is 17-04-2007
    now i need to get the result as

    startdate enddate
    16-Apr-2007 22-Apr-2007



    Can any body please tell me the solving of this problem. I used javascript step but it is giving some problem.


    Thanks & regards,
    Eathi Rajulu Y
    Thanks & Regards,
    Eathi Rajulu.Y

  2. #2
    Join Date
    Mar 2007
    Posts
    16

    Default

    Hi,
    would the attached transformation do the job ?
    Basically, you need a step to read dates from your Excel file, then add the current date with the Get System Info Step, and then filter the rows where current_date >= startdate and current_date <= enddate.
    Hope this helps.
    Régis
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2006
    Posts
    16

    Default

    Thank you very much for helping.
    Thanks & Regards,
    Eathi Rajulu.Y

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.