AnsweredAssumed Answered

How to create a conditional expiration statement on match script?

Question asked by hartojoe on Feb 11, 2016
Latest reply on Feb 16, 2016 by Joel NeSmith

All,

 

I need help creating a conditional expiration statement on match script. So I have a property that I set called {{Timestamp_Response}} = 2016-02-10T09:08:06-0500 and I want the match script to check if the {{Timestamp_Response}} is more than current timestamp + 30 minutes, If yes, return false, Here's what I have so far but can't get it to work:

 

/*long currentTimestamp = System.currentTimeMillis();

long searchTimestamp = {{Timestamp_Response}};

long difference = Math.abs(searchTimestamp - currentTimestamp);

if ((difference > 30 * 60 * 1000))

    return false;->default response

else

    return true;

*/

 

Is there a better way on doing this in VSI or matchscript? Any help or ideas is greatly appreciated.

Thank you.

Outcomes