Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Parsing date EST vs EDT

  1. #1
    Join Date
    Oct 2007
    Posts
    10

    Default Parsing date EST vs EDT

    Trying for week to fix this without success...
    I have a transformation that read a date in an XML tag. It worked well until march 11 2012 (date we adjusted time by an advance of one hour)
    Here is the error
    observation_date_local_time String : couldn't convert string [2012-03-11T02:00:00.000 EDT] to a date using format [yyyy-MM-dd'T'HH:mm:ss.SSS]
    Unparseable date: "2012-03-11T02:00:00.000 EDT"

    But with this date it works
    2012-03-10T01:00:00.000 EST

    yyyy-MM-dd'T'HH:mm:ss.SSS is the format given in the Get Data from XML Fields definition

    Why is it parsing with EST time and not with EDT?
    thanks
    Steve

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

    Default

    Isn't that the time where time jumped?

    ie. time goes:
    2012-03-11T01:59:59.999
    2012-03-11T03:00:00.000

    In that case, 2012-03-11T02:00:00.000 doesn't exist.

  3. #3
    Join Date
    Oct 2007
    Posts
    10

    Default

    Thanks Gutlez, you're right. I understand that the input data are not good.

    Is there a tool or a config I can use as a workaround? Like skipping an invalid date?
    Currently the job crashes.
    Thanks again
    Steve

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

    Default

    I would import it as string, then use a select values step or a javascript step to change it from string to date.

    With either one, you could catch errors and figure out an alternate flow for the bad 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.