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!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,588)