Notifications
Announcements
Hello,
Is anyone able to change the below formula so it collects data for the previous 7 days please?
@And(not(equals(length(item()?['Date']), 0)),equals(formatDateTime(item()?['Date'], 'dd/MM/yyyy'), formatDateTime(utcNow(), 'dd/MM/yyyy')))
Hi @MarkCoates,
You could use the addDays functions an substract 7 days. With greaterorequals and lessorequals you can check if the detail is within the last 7 days time range.
Try an expression like below:
@and(and(not(equals(length(item()?['Date']), 0)), greaterorequals(formatdateTime(item()['Date'], 'yyyy-MM-dd'),addDays(utcNow(),-7, 'yyyy-MM-dd'))),lessorequals(formatdateTime(item()['Date'], 'yyyy-MM-dd'),utcNow('yyyy-MM-dd')))
Thank you very much @Expiscornovus - Also, would you happen to know, in the automatic e-mail I send at the end, how would i be able to show "Please see report from 'Date' to 'Date'"
First date being 7 days ago and 2nd date being today?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 503 Super User 2025 Season 2
Tomac 321 Moderator
abm abm 237 Most Valuable Professional