cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

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
Super User III
Super User III

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

Thanks for insight, I'll try that.

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

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (9,617)