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.

date_add syntax

aoneilaoneil Member Posts: 9 Contributor II
edited November 2018 in Help
My process is working with days (integers) as an input. I want to convert these 'day' values into a real date. I tried using date_add but no matter what type of date I put in (I want the date that I'm adding to to be November 1, 2015) it never converts properly. My most recent attempt is here: date_add(date_millis(2015-11-1 00:00:00.000), day, DATE_UNIT_DAY).

Is this remotely correct? I can't help but feel as if I'm doing something very stupid as I've tried quite a large set of date combinations to no avail.

Answers

  • juan7710juan7710 Member Posts: 11 Contributor II
    I think the problem is that date_millis(2015-11-1 00:00:00.000) is converting a date into a number. So, when applying date_add you are adding a certain amount of days to a number of milliseconds, not to a date.

    Try to remove the date_millis(...) function and use just the date instead.
Sign In or Register to comment.