Hello,
I have a do loop that is running while a date is less than or equal to an end date. For some reason it thinks that 3/8 is greater than 3/19. I am not sure why it is doing this. Any insight would be greatly appreciated.
The format commands are the following
formatDateTime(variables('IncrementedDate'), 'M/d/yyyy')
formatDateTime(variables('EndDate'), 'M/d/yyyy')
Solved! Go to Solution.
I was able to get this working by using the ticks() expression. I converted the 2 dates to ticks and compared the ticks and got the expected run time.
Hi @NWEASD
Do you mean that the ‘do-until’ loop has been skipped?
In your case, the do-until loop will do the actions in it until the first ‘formatDateTime()’ is greater than the second ‘formatDateTime()’.
If it’s skipped, then it’s maybe the variables you defined or some other problems causing this problem. Could you take a screenshot of your detailed flow and the running result?
If the problem still exists, please feel free to let me know.
Best Regards,
Community Support Team _ Kira Xie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The loop is running but it does not run to the full extent that I believe it should be running. Below are screenshots
Second run of the loop...
Since the incremented date is < the end date I would expect this to run again.
I was able to get this working by using the ticks() expression. I converted the 2 dates to ticks and compared the ticks and got the expected run time.
This has reared its ugly head again. I am still comparing ticks and it should continue running but it is not. Any thoughts would be greatly appreciated.
for closer reference -
the do until is -
Found my own mistake. I wanted the first number to be greater than the second to stop. Apparently just need more eyes