🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

What is the correct syntax for the date_diff function. RapidMiner version 10.1

User: "HemalS"
New Altair Community Member
Updated by Jocelyn
floor(date_diff(Dt_Customer, date_parse_str("2014-06-30", "YYYY-MM-DD","us"), DATE_UNIT_DAY, "America/Newyork"))


This function does not resolve. Gives 'unable to obtain ZonedDatetime for TemporalAccess'

Find more posts tagged with

Sort by:
1 - 2 of 21
    User: "Kevin_Majchrzak"
    New Altair Community Member
    Hi HemalS,

    thank you for reaching out to us! This should work:
    floor(date_diff(Dt_Customer, date_parse_str("2014-06-30 00:00 America/New_York", "yyyy-MM-dd HH:mm VV","us"), DATE_UNIT_DAY, "America/New_York"))

    The problems with the original expression were:
    • you need to use yyyy instead of YYYY
    • the time and time zone for date_parse_str were missing
    • the parser expects "America/New_York" instead of "America/Newyork"
    Most valid time zone formats can be found here:
    https://docs.oracle.com/middleware/12211/wcs/tag-ref/MISC/TimeZones.html
    Some additional ones like, for example, "CET" are also allowed.

    We understand that it is inconvenient that you now have to specify the time and time zone and we are investigating how we can improve the user experience in that regard. Most likely, we will have a default time of 00:00:00.000000000 if no time is specified. Unfortunately, we will probably have to keep the time zone requirement, though. This assures that your process produces the same results regardless of you physical location.

    Sorry for the inconvenience! Have a nice day!  :)
    Kevin
    User: "HemalS"
    New Altair Community Member
    OP
    Thank you so much for your response and the clarifications, Kevin! It works and answers my question.