Results 1 to 7 of 7

Thread: String wrongly seen as Date

  1. #1
    Contributor
    Join Date
    Feb 2018
    Location
    Paris, France
    Posts
    20

    Default String wrongly seen as Date

    Hello all,

    my imput file contains employee ID.
    All employees' ID are 4 letters + 4 digits, like 'DHRF4526' or 'HJES4491'.

    But some of them are like 'JUNE1216' or 'DECE2324' and Lavastorm are transforming these values into dates : Jun-16 and Dec-24

    I tried to change the field type (from string to unicode) with the "changes field" node. No success

    Any ideas ?

  2. #2
    Lavastorm Employee gmullin's Avatar
    Join Date
    May 2014
    Location
    Chicago
    Posts
    185

    Default

    It sounds like something Excel might do depending on the format of the cells. Is this an Excel input file? When you click on the entire row for Employee ID in Excel is the format set to date or custom? If so try putting it back to General or Text.

  3. #3
    Contributor
    Join Date
    Feb 2018
    Location
    Paris, France
    Posts
    20

    Default

    Thanks gmullin for your swift feedback.

    Yes it is an Excel input file.

    Cell Format are G (General).
    More precisely, S (Standart) on my french computer.

    I would like to avoid modifying anything in the input excel files. There are too many...

  4. #4
    Lavastorm Employee gmullin's Avatar
    Join Date
    May 2014
    Location
    Chicago
    Posts
    185

    Default

    Can you also try setting IgnoreCellFormatting to true in the Excel node (Optional tab)?

  5. #5
    Contributor
    Join Date
    Feb 2018
    Location
    Paris, France
    Posts
    20

    Default

    As the Excel node wasn't importing the data I used the 'Delimited File' node. Import is well working with that node.

    I just tried to use the Excel Node with IgnoreCellFormatting to true, and it is not working.

  6. #6
    Contributor
    Join Date
    Feb 2018
    Location
    Paris, France
    Posts
    20

    Default

    oups sorry.

    My files are CSV files.

    and here is the error message when I try to import the file(s) with the 'CSV file" node:

    Error while starting execution of node 'CSV+File'
    Error executing node: Node :'CSV+File' (handle: 5ac647af7c210918) encountered error during initialization
    WARN: Property ls.brain.node.convert.filenameExpr not set
    Error Code: brain.node.ConvertNodeControl.cpp.127

    ERROR: Node execution terminated while reading settings by error:
    Property ls.brain.node.convert.filenameExpr not set
    Error Code: lae.node.executionTerminated

    ----------------
    The import with Delimited file works well.

  7. #7
    Lavastorm Employee gmullin's Avatar
    Join Date
    May 2014
    Location
    Chicago
    Posts
    185

    Default

    That error looks like you have an input pin on your CSV node that you possibly need to delete. If you have an input pin you need to use FilenameExpr instead of File. If you have no input pin you can use File to specify the full path of the file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •