
Announcements
Hi All,
I have a flow, which i was helped to build, that returns files when the retraining date is coming up. The problem i have is that it returns all the files which have a retrain date and i only want it to show me the files that will expire in 30 days of the retrain date.
I assume the filter array would need to be change to do this but i am not quite sure to what. This is what it currently looks like:
@And(not(equals(item()?['RetrainingDate'], null)),lessOrEquals(formatDateTime(item()?['RetrainingDate'],'dd-MM-yyyy'), formatDateTime(utcNow(),'dd-MM-yyyy'))).
Thank you
Hi @Anonymous
According to your description, you want to filter out the files that will expire in 30 days, but your formula does not reflect 30 days, so please modify the formula to and try again:
@And(not(equals(item()?['RetrainingDate'],null)),lessOrEquals(formatDateTime(item()?['RetrainingDate'], 'yyyy-MM-dd'), addDays(utcNow(), 30, 'yyyy-MM-dd')))
Best Regards
If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.