The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Need all the timestamp between two dates.
Himanshu_Pant
Member Posts: 46 Learner II
I have a dataset which consist of timestamp. The timestamp are in a gap of 15 mins. If I have two dates stored into macros ( e.g. first_date, last_date), how can I fetch all the timestamp between two macros? Example:
lets say first macro i.e. first_date = 2020-08-15T02:30:00.000Z and second macro i.e. last_date = 2020-08-15T03:30:00.000Z. So with these two macro I want 5 timestamp as an output starting from 2020-08-15T02:30:00.000Z and ending with 2020-08-15T03:30:00.000Z.
2020-08-15T02:30:00.000Z |
2020-08-15T02:45:00.000Z |
2020-08-15T03:00:00.000Z |
2020-08-15T03:15:00.000Z |
2020-08-15T03:30:00.000Z |
2020-08-15T03:45:00.000Z |
2020-08-15T04:00:00.000Z |
2020-08-15T04:15:00.000Z |
lets say first macro i.e. first_date = 2020-08-15T02:30:00.000Z and second macro i.e. last_date = 2020-08-15T03:30:00.000Z. So with these two macro I want 5 timestamp as an output starting from 2020-08-15T02:30:00.000Z and ending with 2020-08-15T03:30:00.000Z.
Tagged:
0
Best Answer
-
yyhuang Administrator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data ScientistHi @Himanshu_Pant, I did not understand "loop Attributes" in your process and replaced it with loop examples that create new timestamps with 15 min interval. See attached.1
Answers
Dortmund, Germany
Thanks for the solution. But can we put ExampleSet in a loop (loop attribute)?
Dortmund, Germany
For each time stamp, I want last 24 hours of data in the gap of 15 mins. So for first time stamp i.e.
2019-04-10T18:45:00.000Z, the output will be:
Dortmund, Germany
From multiply operator, one connection goes to extract macro which will store the first timestamp. The other goes to adjust date which will adjust the date by one day. This will connect to second macro which will store the previous day. Lets say first date is 2019-04-10T18:45:00.000Z. So the first macro (%{last_date}) will store 2019-04-10T18:45:00.000Z and other macro (%{first_date}) will store 2019-04-09T18:45:00.000Z. After this, I used equalize time stamps where I selected equalize method: Range, Start value: custom, custome start date: %{first_date} , Stop value: custom, custome stop date: %{last_date} , step size: 15 mins and replace type date time: liner interpolation.
However this is giving me an error: Process failed (Text '10/04/2019 18:45:00 PM UTC' could not be parsed).
Please suggest another method for the problem statement.
It looks the timestamp needs some conversion from the macro according to the error message. If possible, are you able to share the .xml/.rmp file here?
Cheers,
YY
Kindly help me with this please.
Thanks a lot for your solution. Please help me in future as well.