To address the issue of correctly updating dates from Power Apps to an Excel file without affecting the time component, you need to ensure that the date format and time zones are handled properly. Here’s a detailed solution based on the scenario you provided:
Remove Time Component from Date:
DateValue
function to strip the time component and keep only the date.Update Formula:
Update
formula to ensure only the date part is passed.Here’s how you can modify your current approach:
// Default value for the data card
Default: DateValue(ThisItem.'End Date')
// Update value with only date part, removing time component
Update: DateValue(DateValue8.SelectedDate)
If time zone differences still affect the date, ensure that the DateValue
function correctly interprets the local time zone of the user. In your current configuration, you used TimeZoneOffset
which adjusts for local time differences. Here, stripping the time component using DateValue
should inherently address the time zone difference since it only works with the date part.
Text(DateAdd(DateValue8.SelectedDate, -TimeZoneOffset(), TimeUnit.Minutes), "[$-en-US]yyyy-mm-dd")
Text(DateAdd(DateValue8.SelectedDate, -TimeZoneOffset(), TimeUnit.Minutes), "[$-fr-FR]dd/mm/yyyy")
WarrenBelz
223
Most Valuable Professional
MS.Ragavendar
110
Michael E. Gernaey
89
Super User 2025 Season 1