cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vbvbvb
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
efialttes
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
efialttes
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
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (29,405)