web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to compare a dataf...
Power Automate
Answered

How to compare a datafield with utcnow-function?

(0) ShareShare
ReportReport
Posted on by 166

Hello everyone,
i have a powerautomate workflow that is running daily. I get the elements from a sharepointlist a want to send an email if the Todo-Date is reached. The Todo-Column in the sharepointlist is of type "date".

 

I built a condition like this: "Todo <= utcnow()". But this condition does not work. The following action "Sending an Email" runs even if the Todo-date is in future. The other conditions work right.

 

screenshot_100.png

Has anyone an idea, why that condition is not working properly?

Here is the expression for the two fields:

screenshot_14.pngscreenshot_15.png

I hope that I have explained my problem in a comprehensible way and look forward to your answers.

Jürgen

I have the same question (0)
  • Verified answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @JürgenD 

     

    I have a sharepoint list with column DueDate having column type as Date

     

    Nived_Nambiar_0-1679456714563.png

     

     

    Now in the condition I have specified condition like this

    Nived_Nambiar_1-1679456742198.png

     

    sub(ticks(items('Apply_to_each')?['DueDate']),ticks(formatDateTime(utcNow(),'yyyy-MM-dd')))
     
    This function will calculate the ticks of dates [One tick is 100 nanoseconds, starting with 1st of January 0001 00:00:00] , and subtract them, if they are zero, it means due date and today's date are equal while if result is negative, it means today's date > due date , if it is positive, then due date > today's date.
     
    For more details on using tick function 
    refer the below article
     
    Mark it as solution if it helps 🙂
     
     

     

     

  • JürgenD Profile Picture
    166 on at

    Hello and thanks for your help.

    It works as described.

    Kind regards

    Jürgen

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @JürgenD 

     

    Glad to know it worked 🙂

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard