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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Calculate minutes between two date fields

(0) ShareShare
ReportReport
Posted on by 31
Apologies if it's been answered before.

I would like to calculate how many minutes there are between two dates:

For example I have these two fields in the following format

CreatedOn: 2025-09-17T10:57:43Z
Modified On: 
2025-09-17T11:18:06Z

I read about using ticks function, but is there a simpler way to calculate how many MINUTES it's been between those dates? 

The end goal is to find out if it's been 60 mins or more.
 
Thank you for any help.
I have the same question (0)
  • MishkaGrizzly Profile Picture
    31 on at
    Calculate minutes between two date fields
    Thank you all, all of the solutions are helpful
  • Tomac Profile Picture
    2,167 Moderator on at
    Calculate minutes between two date fields
    @Chriddle 🤣 It's still real early, if you're ever in the Charlotte NC area I'll buy you a coffee
  • Verified answer
    Chriddle Profile Picture
    8,112 Super User 2025 Season 2 on at
    Calculate minutes between two date fields
    I obviously didn't read the last sentence 🤨

    Next try: Add an hour to the start and check if it's still less than the end:
     
    less(
    	addToTime(body('Parse_JSON')?['CreatedOn'], 1, 'Hour'),
    	body('Parse_JSON')?['ModifiedOn']
    )
  • Suggested answer
    Tomac Profile Picture
    2,167 Moderator on at
    Calculate minutes between two date fields
     
    To expand on @Chriddle's great suggestion below, since it doesn't track a raw number of minutes and any number over 60 is converted by the datedifference() function to hours, you'll need to modify the example code a bit:
    Int(
    			split(
    				dateDifference(
    					variables('StartDateTime'),
    					variables('ModifiedDateTime')
    				),
    				':'
    			)[0]
    )
     
     
    To make the entire thing an expression you can use the results of, you would do this:
    If(
    	Greater(
    		Int(
    			split(
    				dateDifference(
    					variables('StartDateTime'),
    					variables('ModifiedDateTime')
    				),
    				':'
    			)[0]
    		),
    		0
    	),
    	'Greater than 60 minutes',
    	'Less Than 60 Minutes'
    )
     
     
    And to use it in a Condition, it would look like this:
    Note that the expression in the Condition is the first example from this comment.
     
    While @Chriddle's great example split the returned value and output the minutes, my modification changes it to return the hours and checks if the number of hours is more than 0, which is the same as more than 60 minutes and aligns with how the datedifference() function returns our data.
     
    Hope this helps!
  • Chriddle Profile Picture
    8,112 Super User 2025 Season 2 on at
    Calculate minutes between two date fields
    You could use function dateDifference()
     
    Int(
    	split(
    		dateDifference(
    			body('Parse_JSON')?['CreatedOn'],
    			body('Parse_JSON')?['ModifiedOn']
    		),
    		':'
    	)[1]
    )
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 807 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 461 Moderator

#3
Power Apps 1919 Profile Picture

Power Apps 1919 339

Last 30 days Overall leaderboard