Posted Tue, 16 Aug 2022 18:08:59 GMT by Mark El

[Duplicate Question Sorry - Please refer to my other question]

So I am making this experimental workflow/task, where I am storing two times in two variable. I want to compare them if  A > B, then stop the task, if not move on to next step.

But the the check is always failing, meaning the comparing does not work. I am using this syntax

If (var1 *lessthan* var2)
    stop the task

Obviously this comparison is not working. My question is how to compare two times in Automate? I am storing both times in this format 'H:mm:ss'.


Thanks
 

Posted Tue, 23 Aug 2022 21:18:37 GMT by James Lankford FirstBank Applications Developer
You can do something like this:<br> &nbsp; <pre class="linenums prettyprint">&lt;AMVARIABLE NAME="time1" TYPE="text" /&gt; &lt;AMVARIABLE NAME="time2" TYPE="text" /&gt; &lt;AMVARIABLE ACTIVITY="set" VARIABLENAME="time1"&gt;%CDate(Date())%&lt;/AMVARIABLE&gt; &lt;AMVARIABLE ACTIVITY="set" VARIABLENAME="time2"&gt;%CDate('2022-08-22')%&lt;/AMVARIABLE&gt; &lt;!-- --&gt; &lt;AMIF EXPRESSION="%time1% &amp;gt; %time2%" /&gt; &lt;AMSHOWDIALOG MESSAGE="Time 1 is &amp;gt; Time 2" WINDOWTITLE="Time Check" /&gt; &lt;AMIF ACTIVITY="end" /&gt;</pre>
Posted Tue, 23 Aug 2022 21:19:53 GMT by James Lankford FirstBank Applications Developer
My prior post didn't seem to format as expected. Trying again with a screenshot attached.<br> &nbsp;

You must be signed in to post in this forum.