cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Post Tweet from RSS feed if publish date is today

Hi,

 

I have an RSS feed for events that shows the next ten events.

I want to only post the events for today to Twitter, not all events in the RSS feed.

 

Any ideas? I can't figure out how to do the IF date type syntax.

 

Thanks

 

Damien

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Post Tweet from RSS feed if publish date is today

Hi @Theatreperson ,

 

You could use formatDateTime() function to convert publishDate to ‘yyyy-MM-dd‘ and then determine if it is equal to utcNow('yyyy-MM-dd').

Expression reference:

formatDateTime(item()['publishDate'],'yyyy-MM-dd')
utcNow('yyyy-MM-dd')

Image reference:

 9.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Post Tweet from RSS feed if publish date is today

Hi @Theatreperson ,

 

You could use formatDateTime() function to convert publishDate to ‘yyyy-MM-dd‘ and then determine if it is equal to utcNow('yyyy-MM-dd').

Expression reference:

formatDateTime(item()['publishDate'],'yyyy-MM-dd')
utcNow('yyyy-MM-dd')

Image reference:

 9.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Post Tweet from RSS feed if publish date is today

Thanks!

 

You put me on the right track. I had not considered using formatDateTime.

I almost used getFutureDate instead of utcNow until I released all the raw dates are UTC so no timezone to worry about.

 

It's working great.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,136)