I have a Power App integrated in a Power BI file, where the user can choose a record from a table (to the left) and the info from the record is added to the app and the user are going to fill the last field manually.
However, the date is one day off and I do not understand where in my app can fix this error.
The table to the left and the app to the right with the wrong date in the date field:
The code is a variable:
Set(VAR_Date, Text(ThisItem.Date, "dd.mm.yyyy")
Solved! Go to Solution.
Hi @bmpi,
Please check your BI report time zone settings, make sure the time zone within the Power BI report data is the same as the one configured with the Device running PowerApps.
And if that is not your scenario, then please consider take use of TimeZoneOffset function together with the DateAdd() to convert the data into proper time.
For the usage, please see:
DateAdd, DateDiff, and TimeZoneOffset functions in PowerApps
For example:
Converting from UTC
To convert from UTC, subtract the TimeZoneOffset (by adding the negative) for the given time.
For example, imagine the UTC date and time July 15, 2013, 8:02 PM is stored in a variable named StartTime. To adjust the time for the user's time zone, use:
Note the negative sign before TimeZoneOffset to subtract the offset rather than add it.
Anyone?
What is the data source for the Power BI report? Is there a reason you're setting the variable as text? Off the top of my head this looks like a timezone issue between Power BI and Power Apps but it's hard to say with the information provided.
The data source in the Power BI report is a tabular model.
I have created a variable to show the date chosen in the Power BI report (among other parameters):
Set(VAR_TransportationDay, Text(ThisItem.'Transportation Day', "dd.mm.yyyy"))
Is there another syntax I should instead of text?
(I have been back and forth with many attempts to solve this date-issue, that I actually don't remember why I ended up with text..)
Hi @bmpi,
Please check your BI report time zone settings, make sure the time zone within the Power BI report data is the same as the one configured with the Device running PowerApps.
And if that is not your scenario, then please consider take use of TimeZoneOffset function together with the DateAdd() to convert the data into proper time.
For the usage, please see:
DateAdd, DateDiff, and TimeZoneOffset functions in PowerApps
For example:
Converting from UTC
To convert from UTC, subtract the TimeZoneOffset (by adding the negative) for the given time.
For example, imagine the UTC date and time July 15, 2013, 8:02 PM is stored in a variable named StartTime. To adjust the time for the user's time zone, use:
Note the negative sign before TimeZoneOffset to subtract the offset rather than add it.
Thanks!
User | Count |
---|---|
163 | |
95 | |
77 | |
72 | |
58 |
User | Count |
---|---|
216 | |
166 | |
97 | |
96 | |
74 |