Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Question about Dates within Excel Input

  1. #1
    Join Date
    Aug 2010
    Posts
    1

    Default Question about Dates within Excel Input

    I'm new to using the forum and PDI and I apologize if this topic has been covered before, I couldn't find it if it was. I'm having difficulty trying to retrieve Dates using the Excel input. I can't seem to get the values correctly.

    I need to retrieve values from a column that are stored as 20100603 and I keep getting what appears like a default value of 1970/01/01 00:35:00.210, when I try to retrieve the value. I tried to add a format of yyyyMMdd and it didn't help.

    If I change the Type to a string the value is retained but the value of yyyyMMdd is appended to the front of the original value. The result looks like this ... yyyyMMdd20100222

    For simplicity I've just tried to read the input file and output it to a simple text file.

    Any help would be much appreciated.

    Thanks,
    Scott

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    If the data in XLS is a String, you can convert directly to a date with the mask you mentioned.
    If the data in XLS is numeric, you should probably convert to a string first and then to a date, using a "Select Values" step for example. The mask you used has no meaning for numeric date and is as such simply put in front of the numeric string representation.

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.