Hello All,
I'm using the Now() function in PowerApp. This function provides a local machine time on which the PowerApp is accessed instead of the server time where the PowerApp is hosted.
Can anyone know about this? Any help would be appreciated.
Thank you
Solved! Go to Solution.
I'm not really sure what you are asking. Yes, the Now function will return the date and time in the current timezone of the user. You can use a combination of the dateadd() and Timezoneoffset() functions to get the current time in UTC (Universal Timecode).
DateAdd(Now(),TimeZoneOffset(Now()))
I'm not really sure what you are asking. Yes, the Now function will return the date and time in the current timezone of the user. You can use a combination of the dateadd() and Timezoneoffset() functions to get the current time in UTC (Universal Timecode).
DateAdd(Now(),TimeZoneOffset(Now()))
@Anonymous
As @Pstork1 mentioned, the Now() function is local machine time.
Are you trying to get some other time? If you need world time, you can always put a custom connector to WorldTime in your App and get the time from there (I'm sure there are others as well you can use).
I am facing a similar issue where some users are changing their local machine's time to overcome the validation checks that I am using in Powerapps.
Is there no workaround rather than using a custom connector?
Here is a simple workaround...
Create a record in a SharePoint list, then get its created date/time.
Set(systemDate, Patch(someList, Defaults(someList), {Title:"something"}).Created)
Even though you would have to do this each time to get the correct date/time, what I have done with it is actually just calculate the difference from Now() to the above and then use that in all date/time calculations.
ex.
Set(localTimeOffset, DateDiff(Now(), Patch(someList, Defaults(someList), {Title:"something"}).Created, Minutes) )
Later...
DateAdd(Now(), localTimeOffset, Minutes)
User | Count |
---|---|
188 | |
125 | |
91 | |
47 | |
42 |
User | Count |
---|---|
271 | |
161 | |
132 | |
83 | |
78 |