Compute diff between dates and number of days

Options
Ankur5289
Ankur5289 Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 27 Partner

Hi , Is there a way to have date column as input and number if days stored in Integer format.

i want to subtract them and have my output stored in a date column. The inc() function will not work because i have the column name and can be used only for incrementing dates by a number.

Suppose i want to decrement a date by a particular column having bigint , then could you pls guide how to do achieve that ?

Tagged:

Best Answer

  • HarizoR
    HarizoR Dataiker, Alpha Tester, Registered Posts: 138 Dataiker
    edited July 17 Answer ✓
    Options

    Hi,

    If all your column's values are positive and you want to decrement from it, you can just multiply it by -1 to achieve the desired output:

    inc(date, -1*delta_days, "days")

    Best,

    Harizo

Answers

Setup Info
    Tags
      Help me…