Recently i had a requirement where i had to calculate difference between two dates and perform some check if difference was exceeding a given number.
There can be multiple ways of solving the problem the two best one are either write a custom script and do calculation there or use the expression in workflow and store dates in process properties and do checks there.
My requirement was to compare Date of Transaction with present date and Execute a operation only if the difference was greater than 10 Days.
There can be multiple ways of solving the problem the two best one are either write a custom script and do calculation there or use the expression in workflow and store dates in process properties and do checks there.
My requirement was to compare Date of Transaction with present date and Execute a operation only if the difference was greater than 10 Days.
Approach :
1. Create 2 Process Properties ,
Name : JulianDayToday
Value : Timestamp()
Name : TxnProcessedDate
Value : Create Date Field of BC
The Difference can be calculated with Expression
Difference = [&TxnProcessedDate] - [&JulianDayToday]
value stored in difference can be used in decision points to execute the desired step.
hope this was helpful .. cheers..
Is difference a process property?
ReplyDelete