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
Changes on date conversion functions
raulsamaniego
Member Posts: 9 Contributor II
in Help
Hi,
Recently updated from RM Studio 10.0.000.to 10.1.001.
I need to convert strings like "20230207" (year+month+day) to simple dates.
This expresion worked on old Generate attributes operator:
date_parse_custom("20230107",yyyyMMdd")
Returning dates with 12:00:00 AM CET time wich are ok, but this function disappeared in new version and I can't find much documentation to move it to new date_parse_str()
Ane help welcome.
Thanks in advance
Recently updated from RM Studio 10.0.000.to 10.1.001.
I need to convert strings like "20230207" (year+month+day) to simple dates.
This expresion worked on old Generate attributes operator:
date_parse_custom("20230107",yyyyMMdd")
Returning dates with 12:00:00 AM CET time wich are ok, but this function disappeared in new version and I can't find much documentation to move it to new date_parse_str()
Ane help welcome.
Thanks in advance
0
Best Answers
-
jwpfau Employee-RapidMiner, Member Posts: 303 RM EngineeringHi,
Thank you for your feedback.
As a workaround you could try to add the missing informationdate_parse_str(concat(date, "0000CET"), "yyyyMMddHHmmVV", "us")
Greetings,
Jonas0 -
Marco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM EngineeringHi,The point of the change was that "date" only is a bit of a weird concept once you start taking timezones into account. Feb 08 in Berlin, Germany as a point in time is not necessarily Feb 08 in Sidney, Australia. Dates always had an implicit time component included (usually midnight local time), so if you were collaborating with colleagues across different timezones, dates could be deceiving. Subtle errors were sometimes introduced because suddenly the date could mean a different day in another timezone on another computer and stuff like that.Therefore we decided to enforce the inclusion of a time and a timezone to avoid this. We now offer "date_time" and "time of day" as two distinct concepts, but no longer just date. This was done to make sure all calculations will be correct, no matter which local timezone the machine running a process is in.
We see that there are a few cases where you'd want to calculate say number of days between 2 dates which is now a bit more complicated, but again, same problems as listed above would apply if we did not force inclusion of a time + timezone. We decided in favor of explicit definitions and correct results, and made it a bit more complicated as a tradeoff.Regards,Marco0 -
Marco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM EngineeringHi,
Yes, thank you for your feedback, we will look into how to make that more user-friendly / obvious what is required. I agree, it's not handled as nice as it could be right now.
As a sidenote, we are always rolling out changes like this in a rolling manner, meaning that we change not necessarily all operators at once. So now we have some other operators that still use the previous expression parser.
And in all cases, existing processes will continue to work because we keep both versions operator you get when dragging it into a process, but the previous, existing version still exists to keep existing processes intact.
Regards,
Marco0
Answers
Thank you very much, Jonas.
Thank you very much. I understand the reasons about the update but I think it would be nice to help the users about the possible workarounds.
As I told you, It was impossible to find information about it.
By the way, note the old function is still running in other operators.
Regards
Raúl