Hi - Thanks for the feedback - the first option I don't seem to be able to get to work - the second option does although it would be easier if I could just do this check using the loop condition - rather than having to test the dates and set a flag for the loop, so that it can test to see if it should finish.
If I try creating a user variable as a numeric and assigning it the value from a string function it refuses to accept the assignment when editing the set variable task - insists that the variable type must be string even if the output of the function is a numeric string. If I leave it set to string in the set variable task it converts the user variable to string type even if it is created as numeric.
Thanks