Hello @DC-q489h2 ,
Thanks for the ask and using the Microsoft Q&A platform .
Let me underatand the ask , I think you have a startdatetime and you want to have all the time at regular intervals which is less then some enddatime . You want this to be in array , which you can pass to an foreach ( FE ) loop .
If my understanding is correct , you can acheive this by using a pipeline with Start and enddate parameters , create a variable of type array ( this will have all the time entries ) . One FE loop , which will iterate for N time and I am using the range function . I am using
addhours function . The logic is very simple , the below animation should help .
I am sharing the key dynamic exprtession which should help .
@range(1,10)
@bool(less(pipeline().parameters.starttime,pipeline().parameters.Endtime))
@addhours(pipeline().parameters.starttime,item())
Please do let me know how it goes .
Thanks
Himanshu
Please do consider clicking on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members