Notifications
Announcements
I have a lookup function in a PowerApp that pulls the date shown in a Sharepoint list. Unfortunately the date from the list is shown in UTC time (YYYY-MM-DDTHH:MM:SSZ). Anyway to have the date display as the local date MM-DD-YYYY HH-MM in the app without changing the Sharepoint list format? Essentially removing the 'T', the 'Z' and the 'SS' from the original UTC time and converting to whatever the local time is for that user? Thanks!
You can use a Text() function around the value pulled from SharePoint to format it however you want it to appear. Text function - Power Platform | Microsoft Learn
@Pstork1 Thanks, my text function is already pulling the data from a sharepoint list:
LookUp('Sharepoint_List', Author.Email=User().Email && Active = true).Date
So, I'd need to somehow add this code around this function? A bit above my head at present (newbie here).
The following will reformat the lookup as a Date. If you want to adjust the date/time from UTC to the local timezone then you also need to use TimeZoneOffSet()
Text(LookUp('Sharepoint_List', Author.Email=User().Email && Active = true).Date,"mm/dd/yyyy")
With TimeZoneOffset
Text(DateAdd( LookUp('Sharepoint_List', Author.Email=User().Email && Active = true).Date, −TimeZoneOffset( LookUp('Sharepoint_List', Author.Email=User().Email && Active = true).Date), TimeUnit.Minutes ), "mm/dd/yyyy")
Thanks @Pstork1 unfortunately your first line of code didn't seem to make a change, date is still showing up as:
2024-04-03T17:57:20Z
Can you provide a screenshot of where and how you are using the code when doing the lookup?
Sorry, my bad. Turns out the field in Sharepoint wasn't a data field. Using DateTimeValue instead worked great!
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 765 Most Valuable Professional
Michael E. Gernaey 343 Super User 2025 Season 2
Power Platform 1919 272