cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Microsoft
Microsoft

Subtract 2 date variables to get minutes value

Hi all, is there are easy way to make calculation to subtract date string value from UtcNow to get difference  in minutes (string or integer)?

 

For example: 

  • Variable is "2020-04-09T16:12:17Z";
  • UtcNow is "2020-04-09T15:30:17Z"
  • Variable - UtcNow = 42 minutes

I guess easiest way would be to convert both date string values into integer and make subtraction, but is there's expression in Flow which allows that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User III
Dual Super User III

Re: Subtract 2 date variables to get minutes value

Hi!

ticks() funtion based expression should do the magic. Please have a look to this thread

https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-get-difference-between-two-dates-in-f...

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

3 REPLIES 3
Highlighted
Dual Super User III
Dual Super User III

Re: Subtract 2 date variables to get minutes value

Hi!

ticks() funtion based expression should do the magic. Please have a look to this thread

https://powerusers.microsoft.com/t5/Building-Power-Apps/how-to-get-difference-between-two-dates-in-f...

Hope this helps

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Microsoft
Microsoft

Re: Subtract 2 date variables to get minutes value

Thanks for insight, I'll try that.
Highlighted
Microsoft
Microsoft

Re: Subtract 2 date variables to get minutes value

Thanks once again, that detailed posted is great, it worked like a charm.

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (4,454)