Compare a SharePoint Date with Today in Power Automate
Question details
The user needs to correctly compare a date value retrieved from a SharePoint column against the current date (today) within a Power Automate flow.

- Product
- Microsoft Power Automate
- Device & OS
- not provided
- Scenario
- Creating or troubleshooting a Power Automate workflow that evaluates a condition based on a date from a SharePoint list.
- Observed behavior
- Date comparisons often fail due to invalid date values, incorrect internal SharePoint field names, or mismatched time formatting between SharePoint and Power Automate.
Verify that your SharePoint date column contains valid data and locate the exact internal name of the column, as using the display name in Power Automate expressions will cause the flow to fail.
Use formatDateTime and utcNow Expressions for Comparison
The most reliable method is to standardize both the SharePoint date and today's date into a uniform string format, completely eliminating timezone and timestamp discrepancies.
Power Automate stores the current time in UTC, while SharePoint may return dates differently based on regional settings. By formatting both to 'yyyy-MM-dd', you ensure an apples-to-apples comparison.
Open your Power Automate flow and insert a 'Condition' action where you need the date comparison to occur.
Click inside the left value box, go to the Expression tab, and enter: formatDateTime(triggerOutputs()?['body/YourInternalColumnName'], 'yyyy-MM-dd'). Replace 'YourInternalColumnName' with your actual SharePoint internal field name, then click OK.
Click inside the right value box, go to the Expression tab, and enter: formatDateTime(utcNow(), 'yyyy-MM-dd'). Click OK.
Choose your desired logical operator from the middle dropdown, such as 'is equal to', 'is greater than', or 'is less than'.

Convert Dates using the ticks() Function
If your workflow requires you to calculate the exact mathematical time difference rather than just matching dates, you can convert both timestamps into ticks.
Handle Empty SharePoint Date Columns
Prevent expression evaluation errors by verifying that the SharePoint date column actually contains data before attempting a date comparison.
Enhance Your Productivity with WPS Office
While you automate data with SharePoint and Power Automate, you need a robust and reliable office suite to manage exported spreadsheets, documents, and reports. WPS Office is a highly compatible, lightweight alternative to Microsoft Office that meets all your daily documentation needs.
- 1. Download the Installer: Visit the official WPS Office website and click the Free Download button for your specific operating system (Windows, Mac, or Linux).
- 2. Install the Software: Run the downloaded installation file and follow the quick on-screen instructions to set up the suite on your computer.
- 3. Open Your Documents: Launch WPS Office and instantly open your existing Microsoft Office files without losing any formatting or data.

Frequently Asked Questions
Why does my Power Automate flow fail with a 'String was not recognized as a valid DateTime' error?
This error occurs when the SharePoint date column is empty or contains an invalid format. To resolve this, ensure you are referencing the correct internal column name and add a condition to check if the field is empty() before attempting to format the date.
How do I find the correct internal name of a SharePoint column for Power Automate?
Navigate to your SharePoint list settings and click on the column name you want to use. Look at the URL in your web browser; the internal name is the text at the very end of the URL, directly after 'Field='.
What is the difference between utcNow() and the local time in Power Automate?
utcNow() returns the current date and time in Coordinated Universal Time (UTC). If your SharePoint site is in a different timezone, comparing utcNow() directly to a local date might cause a mismatch. Standardizing both to just the date using formatDateTime with 'yyyy-MM-dd' mitigates this issue.




