Power Automate - How to filter SQL datetime values?

preview_player
Показать описание
This video explains how to filter SQL datetime values using Power Automate.

Expression I used in this video are:

Filter by Date
formatDateTime(addDays(utcNow(),-30),'yyyy-MM-dd')

Filter by DateTime
formatDateTime(addDays(utcNow(),-30),'yyyy-MM-ddT00:00:00Z')
Рекомендации по теме
Комментарии
Автор

Thank you so much, i was trying for several days until now.

PudimDeGuerra
Автор

Worked for me, did struggle initially troubleshooting

JohnsonVettuvelil
Автор

Hi, I am trying to do, gt (greater than) like date(TimeStamp) gt date(2022-11-30T13:25:00Z), which should pick up any records created after 13:25, but after testing the condition looks to me, condition is only works for date, not for time, is there any function available to consider date and time?

SV-stiw
Автор

Its working with date only, not with datetime. It would be great if we have a solution for that!

phaniyelisi
Автор

This worked for me but do you happen to have the link to the documentation about using date() in the filter query?

DavidPrenticeJr
Автор

This does not work!! I've been trying to filter MSSQL datetime for 3 days now. I've tried everything chat suggested, it gave up. I've tried your solution, it returns null. I've tried many other suggestions. My datetime includes fractional seconds. Flow doesn't consider those and will fail if they exist in the SQL data. I've even tried your trick as in date(DTMUPD) ge '2024-12-19' This returns null data set. Am I doing something wrong? Any help you can offer would be greatly appreciated.

pabeader
Автор

Hi! thanks for your video. I have a question, How I can group by data from SQL?

josebravo
Автор

This metod works great with days, but not with hours. I need to get rows of last 8 hours. I tried with datetime but it doesn't work. Any idea how to filter it?

Sparky