Page 1 of 1

Automation: Date arithmetic result store in a variable

Posted: Wed Nov 06, 2019 5:57 am
by Femi6511
I am using automation scripts and triggers to achieve my purpose, but the result of my date arithmetic does not seem to be available for storage in an integer variable declared at the start of the script, e g.
In the below script
RESUMEDATE, APPLYDATE, YEARS are extended properties of the documents.

foreach ($doc in $documents)
Int diff, dobdiff;
#set( $diff = $getfullYear.doc("RESUMEDATE") - $getfullYear.doc("APPLYDATE")

My expectation is to have the difference in years stored in the extended properties YEARS for each document.
The script runs, but still no value stored for YEARS in my extended properties.
Anybody to assist please. Thank you.