Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Nominal2Date Unparseable date: "'2009-04-09 00:00:00'"

wesselwessel Member Posts: 537 Maven
Dear All,

I have the following error, and I'm unsure why.
[Fatal] Process failed: Cannot parse the data in line 1 for attribute systime with the date format yyyy-MM-dd HH:mm:ss: Unparseable date: "'2009-4-9 00:00:00'"

I use the following data format:
yyyy-MM-dd HH:mm:ss

My CSV file looks like this:
systime
'2009-4-9 00:00:00'
'2009-4-9 01:00:00'
'2009-4-9 02:00:00'
'2009-4-9 03:00:00'
'2009-4-9 04:00:00'
'2009-4-9 05:00:00'
'2009-4-9 06:00:00'
'2009-4-9 07:00:00'
'2009-4-9 08:00:00'
'2009-4-9 09:00:00'
'2009-4-9 10:00:00'
'2009-4-9 11:00:00'
'2009-4-9 12:00:00'
'2009-4-9 13:00:00'
'2009-4-9 14:00:00'
'2009-4-9 15:00:00'
'2009-4-9 16:00:00'
'2009-4-9 17:00:00'
'2009-4-9 18:00:00'
'2009-4-9 19:00:00'
'2009-4-9 20:00:00'
'2009-4-9 21:00:00'
'2009-4-9 22:00:00'
'2009-4-9 23:00:00'
'2009-4-10 00:00:00'
'2009-4-11 01:00:00'

My error log like this:
  Root[1] (Process)
  +- CSVExampleSource[1] (CSVExampleSource)
  +- Nominal2Date[1] (Nominal2Date)
G Jun 11, 2009 11:14:21 PM: [Fatal] UserError occured in 1st application of Nominal2Date (Nominal2Date)
G Jun 11, 2009 11:14:21 PM: [Fatal] Process failed: Cannot parse the data in line 1 for attribute systime with the date format yyyy-MM-dd HH:mm:ss: Unparseable date: "'2009-4-9 00:00:00'"
          Root[1] (Process)
          +- CSVExampleSource[1] (CSVExampleSource)
here ==> +- Nominal2Date[1] (Nominal2Date)




Answers

  • wesselwessel Member Posts: 537 Maven
    I found out its the single quotes that make it ERROR.

    Any way to include the quotes in the pattern?

    Like: \'yyyy-MM-dd HH:mm:ss\' or something?
  • TobiasMalbrechtTobiasMalbrecht Moderator, Employee, Member Posts: 295 RM Product Management
    Hi,

    no, but you could replace the quotes by nothing using the [tt]Replace[/tt] operator before:

    <operator name="Replace" class="Replace">
        <parameter key="attributes" value="date"/>
        <parameter key="replace_what" value="&#39;"/>
    </operator>
    Kind regards,
    Tobias
Sign In or Register to comment.