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 Automate
Unanswered

Flow and Azure DevOps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, I'm trying to get the time spent on a work item. Like, if I activated the user story/task at 15:30 and closed it at 15:44, I would have spent 14 minutes on it. This is what I'm trying to do right now

 

hd2gTrT.png (615×375) (imgur.com)

Q4Iuv4z.png (615×207) (imgur.com)

iew6cXx.png (1036×182) (imgur.com)

 

where is expression in the compose is

div(sub(ticks(formatDateTime('tempo_fechamento', 'h:mm')),ticks(formatDateTime('tempo_abertura', 'h:mm'))),864000000000)
 
and the error I get is
Unable to process template language expressions in action 'Compose' inputs at line '1' and column '14946': 'In function 'formatDateTime', the value provided for date time string 'tempo_fechamento' was not valid. The datetime string must match ISO 8601 format.'.
 
could somebody give me a hint as what to do
Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    The format for Date time needs to be in ISO 8601 format.  When using FormatDateTime in Power Automate use the built-in format of 'o' for that.  So use this formula instead.

    div(sub(ticks(formatDateTime('tempo_fechamento', 'o')),ticks(formatDateTime('tempo_abertura', 'o'))),864000000000)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I'm still getting the same error 😞

    The flow looks like this iZsFqFW.png (614×634) (imgur.com)

    and at the end I'm just sending a message in the Teams app

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard