web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trying to get all Site...
Power Automate
Unanswered

Trying to get all Site Pages published in last 24 hours ,but its returning more...

(0) ShareShare
ReportReport
Posted on by 27

I am using the Action Get Files (properties only) for SharePoint to query all Site Pages published in the last 24 hours, but for some reason, its grabbing more like the last 26-30 hours..  basically anything with todays date or yesterdays and I cannot figure out why.

 

The query I am using is getting FirstPublishedDate greater than or equal to utc time now a day ago AND if it was published (PromotedState of 2:

 

(FirstPublishedDate ge '@{formatDateTime(addDays(convertFromUtc(utcNow(),'Central Standard Time'),-1),'yyyy-MM-ddThh:mm:ssZ')}') and (PromotedState eq '2')

 

also this does not work

(FirstPublishedDate ge '@{formatDateTime(addDays(-1),'yyyy-MM-ddThh:mm:ssZ')}') and (PromotedState eq '2')

 

I also tried just getting the last 24 hours

(FirstPublishedDate ge '@{formatDateTime(addHours(-24),'yyyy-MM-ddThh:mm:ssZ')}') and (PromotedState eq '2')

Get List Properties.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Any thoughts to why when it runs every day at noon, it also includes stuff from yesterday morning (BEFORE noon).  thanks!

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at

    Your News Page dates should come back as UTC time in Power Automate. Can you try the following (without any formatting).

     

    grantjenkins_0-1668664471636.png

     

  • jherschel7 Profile Picture
    27 on at

    Thank you! I guess I was over-thinking it and no need to use formatDateTime function...

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard