cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fgonzalez515
Helper III
Helper III

FILTER COLUMN DATE SQL IN POWER AUTOMATE DESKTOP

Hello Community,


I have a SQL DataTable in Power Automate Desktop, these elements come from an Excel.

How can I filter the column 'Recepcion' for example only '01-07-2022' ??

 

fgonzalez515_0-1656798263995.png

 

fgonzalez515_2-1656798355444.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ankesh_49
Super User
Super User

SELECT * FROM [YOURSHEETNAME$]WHERE[Recepcion] between #01-07-2022# and #01-07-2022 23:59:59#

View solution in original post

8 REPLIES 8
Ankesh_49
Super User
Super User

@fgonzalez515  Try this

SELECT * FROM [YOURSHEETNAME$] WHERE [Recepcion]='01-07-2022'

 

Cheers,

Ankesh

--------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Hi @Ankesh_49

 

I try but show me this error "Error in SQL statement Data types mismatch in criteria expression"

 

fgonzalez515_0-1656858191308.png

Ankesh_49
Super User
Super User

Select *

the field is date time not date 😉

Ankesh_49
Super User
Super User

@fgonzalez515  As @Gidi  correctly pointed out it’s a date time field. Therefore, if you have control over the data then remove time from it or tweak the query as below giving a range

SELECT * FROM [YOURSHEETNAME$] WHERE[Recepcion] between '01-07-2022' and '01-07-2022 23:59:59'

 

Cheers,

Ankesh

--------------------------------

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

 

Hi @Ankesh_49 

 

I do it to filter the columns I want

@Ankesh_49 

 

It shows me the same error, "Error in SQL statement Data types mismatch in criteria expression."

fgonzalez515_0-1656883541690.png

 

Ankesh_49
Super User
Super User

SELECT * FROM [YOURSHEETNAME$]WHERE[Recepcion] between #01-07-2022# and #01-07-2022 23:59:59#

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Top Solution Authors
Top Kudoed Authors
Users online (4,550)