Skip to main content
August 23, 2024
Solved

How can I get the difference (in days) between two DATETIMES?

  • August 23, 2024
  • 5 replies
  • 3 views

Hi All,

I am calling 2 values from my record type in the DATE and TIME format and I want it to produce the amount of days in between the dates.

Saw this suggestion in a previous post in regular date format: tointeger(tointervalds(today()) - tointervalds(today()) but did not work from the date due to not able to calculate different in seconds?

Best answer by konduruc733182

Hello [mention:e5a71e89989a47af837ed9c1edd9f90d:e9ed411860ed4f2ba0265705b8793d05] 

Please look at the below

docs.appian.com/.../fnc_date_and_time_calworkdays.html

5 replies

konduruc733182
August 23, 2024

Hello [mention:e5a71e89989a47af837ed9c1edd9f90d:e9ed411860ed4f2ba0265705b8793d05] 

Please look at the below

docs.appian.com/.../fnc_date_and_time_calworkdays.html

gusl6792Author
August 23, 2024

"Expression evaluation error at function 'calworkdays': Could not cast from Record Field to Date and Time. Details: CastInvalidCould not cast from Record Field to Date and Time. Details: CastInvalid" is the error I receive

konduruc733182
August 23, 2024

Please share the code snippet you are trying

Could not cast from Record Field to Date and Time. Details: CastInvalidCould not cast from Record Field to Date and Time. Details: CastInvalid"

May be you are not indexing the value but just mentioning the record Field.