web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps TimeUnit.XXX...
Power Apps
Unanswered

PowerApps TimeUnit.XXX no longer recognized since Update?

(0) ShareShare
ReportReport
Posted on by

Everything was working fine until the update of components 1-2 days ago. Without any change to my specific code block. TimeUnit.anything is no longer recognized. I can still use e.g. TimeUnit.Hours in the canvas app area, the problem only occures in the components tab.

Why does this error occur? TimeUnit.XXX is a built in function...

In my PowerApps app, I have a component with the "function" getTextFromTimeRounded, shown in this image:

xq_0-1686912819736.png

 

 

My code:

 

If(
 IsBlankOrError(timeValue);
 "";
 DateDiff(Now(); timeValue; TimeUnit.Hours) >= 24;
 $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Hours) / 24; 0)} Tag(en)";
 DateDiff(Now(); timeValue; TimeUnit.Minutes) >= 60; 
 $"ca. {Round(DateDiff(Now(); timeValue; TimeUnit.Minutes) / 60; 0)} h";
 $"{DateDiff(Now(); timeValue; TimeUnit.Minutes)} min"
)

 

 

 

 

 

Every TimeUnit.XXX is marked as an error, "TimeUnit is not recognized", but it works fine in the canvas. 

xq_1-1686912834517.png

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    on at

    UPDATE: The error is still there.... but somehow it works now.. i don't know whats going on...

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard