Skip to main content
kavyam0002
July 11, 2023
Solved

subtract

  • July 11, 2023
  • 5 replies
  • 0 views

Hi,

i'll give any date it has to subtract with today and give me number of days difference

ex: inputdate -today= no of days difference, 04/07/2023- today = 7 days

which functions i can use to achieve this? suggest me

    Best answer by sanchitg0002

    No need to use a function for this, just use minus(-) operator between the dates.

    tointeger(ri!input - today())

    Make sure that both the inputs are of Date type.

    5 replies

    July 11, 2023

    No need to use a function for this, just use minus(-) operator between the dates.

    tointeger(ri!input - today())

    Make sure that both the inputs are of Date type.

    shanmathip7466
    Inspiring
    July 11, 2023

    Or we can use `abs` to not return negative numbers.

    abs(ri!date1-ri!date2)

    November 29, 2023

    @traffic jam 3d You can use the datedif() function in Python's datetime module.

    stefanhelzle0001
    Brainy
    November 29, 2023

    There are no snakes in Appian! And no British comedians!