PowerApps TimeUnit.XXX no longer recognized since Update?

106 Views Asked by At

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:

properties of getTextFromTimeRounded

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.Hours is not recognized", but it works fine in the canvas.

Code Block with TimeUnit marked as error

1

There are 1 best solutions below

0
On BEST ANSWER

as carlosfigueira mentioned, this issue has been fixed