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.

Problem with Date Time creation

iesnaolaiesnaola Member Posts: 8 Contributor II
edited December 2018 in Help

Hi everyone,

 

I am dealing with a problem regarding date-times in Rapidminer.

I read a CSV with a nominal variable "date" with format "dd-MM-yyyy hh:mm:ss". I am using the Nominal to Date operator, converting this nominal variable to a date_time variable.

The same way, I have a loop where I increase another date attribute by one hour, using the Generate attributes with the function expression: "date_add(myDate, 1, DATE_UNIT_HOUR").

Problem comes when, inside the loop, I try to Join the two datasets. These are the values for these variables in both datasets:

 

Dataset1                                               Dataset2

Tue Jan 09 08:00:00 CET 2018 Tue Jan 09 08:00:00 CET 2018
Tue Jan 09 09:00:00 CET 2018 Tue Jan 09 09:00:00 CET 2018
Tue Jan 09 10:00:00 CET 2018 Tue Jan 09 10:00:00 CET 2018
Tue Jan 09 11:00:00 CET 2018 Tue Jan 09 11:00:00 CET 2018
Tue Jan 09 12:00:00 CET 2018 Tue Jan 09 00:00:00 CET 2018
Tue Jan 09 13:00:00 CET 2018 Tue Jan 09 13:00:00 CET 2018
Tue Jan 09 14:00:00 CET 2018 Tue Jan 09 14:00:00 CET 2018
Tue Jan 09 15:00:00 CET 2018 Tue Jan 09 15:00:00 CET 2018
Tue Jan 09 16:00:00 CET 2018 Tue Jan 09 16:00:00 CET 2018

 

Problem is that the date on red, is written as "Jan 9, 2018 12:00:00 AM CET" in one dataset, and "Jan 9, 2018 12:00:00 PM CET" in the other one... I don't know why this happens, neither how I can solve it.

 

Any ideas on this matter?

 

Thanks in advance,

Answers

  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    Huh, is there a Tue Jan 09 00:00:00 CET 2018 in Dataset 1? 00:00:00 is midnight, which we all know is differened from 12:00:00 (noon). The Join is throwing an error because the date-times are different there.

     

    Just a sanity check, but does RapidMiner recognize both datasets as date-times?

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager

    hi...joining timestamps can be tricky. If it were me, I would convert all timestamps to epoch using the date_millis() function in Generate Attributes. This way you know exactly what you're dealing with.

     

    Screen Shot 2018-02-22 at 6.40.57 PM.png

     

    Scott

     

Sign In or Register to comment.