web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Lookup function date s...
Power Apps
Answered

Lookup function date shows as UTC time zone

(0) ShareShare
ReportReport
Posted on by 21

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!

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,729 Most Valuable Professional on at

    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

  • SP-20081452-0 Profile Picture
    21 on at

    @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).

  • Verified answer
    Pstork1 Profile Picture
    68,729 Most Valuable Professional on at

     

    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")

     

  • SP-20081452-0 Profile Picture
    21 on at

    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

  • Pstork1 Profile Picture
    68,729 Most Valuable Professional on at

    Can you provide a screenshot of where and how you are using the code when doing the lookup?

  • SP-20081452-0 Profile Picture
    21 on at

    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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard