
Announcements
Hello everyone!
I’m encountering an issue comparing two dates in Power Automate’s Get items action. I have two variables to work with, each handling dates in different ways:
Variable 1: This converts a date from a SharePoint list item (Date of Expired) into the format yyyy-MM-dd. If the value is blank, it defaults to 2000-01-01.
if(empty(item()?['Date of Expired']), '2000-01-01', formatDateTime(item()?['Date of Expired'], 'yyyy-MM-dd'))
utcNow()) into yyyy-MM-dd.
formatDateTime(utcNow(), 'yyyy-MM-dd')
The issue arises when I try to compare these two variables in a filter query within Get items. I keep receiving an error message.
Does anyone know the correct way to format this query for a successful date comparison in Power Automate? Any help would be appreciated!
(Date_x0020_of_x0020_Expired ne null) and (Date_x0020_of_x0020_Expired gt formatDateTime(utcNow(), 'yyyy-MM-dd'))