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

Announcements

News and Announcements icon
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
    69,554 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
    69,554 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
    69,554 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard