cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nc1
Frequent Visitor

postgres connector get rows filter query on first of the month

I am trying to get rows from a table where the date is equal to the first of the current month. I've used the expression builder to get this expression but it gives no results. The column in my table that I am matching on is pull_date. My filter Query raw input looks as follows:  pull_date eq formatDateTime(utcNow(),'yyyy-MM-01')

input looks like this: pull_date eq 2021-09-01

I have also tried: pull_date eq 'formatDateTime(utcNow(),'yyyy-MM-01')'

pull_date eq datetime'formatDateTime(utcNow(),'yyyy-MM-01')'

which both provide errors

The column in the database is type date and formatted 'yyyy-MM-DD'. Does anyone have experience with the postgres connector or have a potential solution?

 

Thanks

N

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
nc1
Frequent Visitor

In case anyone is looking for something similar, I came to a workaround solution. Rather than filter that in the query directly I used a more general query and then parsed the json results. From there I used a filter array action to keep only the dates I was looking for by utilizing the following from above: 'formatDateTime(utcNow(),'yyyy-MM-01')'

 

Hope this helps someone!

View solution in original post

1 REPLY 1
nc1
Frequent Visitor

In case anyone is looking for something similar, I came to a workaround solution. Rather than filter that in the query directly I used a more general query and then parsed the json results. From there I used a filter array action to keep only the dates I was looking for by utilizing the following from above: 'formatDateTime(utcNow(),'yyyy-MM-01')'

 

Hope this helps someone!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,676)