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

Datediff()

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello community,

I'm working on an app where I'm working to calculate the break time duration of an employee. When I test my app on power apps it gives me the right value, but when I test my apps on teams it gives me the wrong value. 

taimoorahmed897_0-1665170121616.png

the formula expression which I am using to patch my break duration  is:

Patch(SPlist,Defaults(SPlist){

BreakDuration : DateDiff(
DateTimeValue(
Bintime.Text,
"fr-FR"
),
Now(),
Minutes
)

})

Bintime is my label where im displaying my break start time and im using this in my formula too.

Categories:
  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

     

    @Anonymous 

     

    Check here if it helps

     

    Date/Time is wrong 

    If you don't have a server side solution, and need a simpler solution, check if you can do this below instead:

     

     

    Set(varCurrentTime, Now());
    DateDiff(
    DateTimeValue(
    Bintime.Text,
    "fr-FR"
    ),
    varCurrentTime,
    Minutes
    )

     

     

     It's possible Power Apps is caching the Now() and calculating it only once - and maybe more so in Dataverse for Teams - and perhaps an explicit Set to a variable forces it to update, for some reason.

     

    Does the above help?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @poweractivate ,

    thanks for your reply but still i am facing the same issue.

    taimoorahmed897_0-1665172265198.png

    some users have the right value in their column, and also when im getting right value through power apps but not from teams.

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 Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard