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 / Datetime in Galleries
Power Apps
Answered

Datetime in Galleries

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a big problem with datetime data stored in SQL Server database, when I show in a Gallery this datetime data, It shows 5 hours late, for example data stored in database:

 

DataType datetime

2019-03-01 09:11:00.000

 

Information shown in the Gallery

1 marzo 2019 4:11

 

Thks.

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Try to change your formula for them to the following:

       DateAdd(yourDateField, -TimeZoneOffset(yourDateField), Minutes)

     

    It is a difference in the TimeZone offset you are most likely seeing, so the above should help.

    You can get more info on the TimeZoneOffset function and other Time functions in the documents here.

     

    Hope this is helpful.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    It is a known issue/limit with datetime column in SQL Table. When you display datetime column value from a SQL table within an app, you may have the offset issue (Due to different time zone).

    More details about the known issue/limit with datetime column in SQL table, please check the following blog:

    https://powerapps.microsoft.com/en-us/blog/working-with-datetime-values-in-sql/

     

    As an alternative soluion, you could consider take a try to remove the datetime type column from your SQL table, instead, add a datetimeoffset type column in your SQL table to store the date time value.

     

    In addition, I also agree with @RandyHayes 's thought almost. If you don't want to remove the datetime column value from your SQL table, I think the TimeZoneOffset() function and DateAdd() function could achieve your needs (mentioned within above blog I provided).

    I have made a test on my side, please take a try with the following formula (set the Text property of the Label control in your Gallery to following😞

    DateAdd(YourDateTimeColumn, -TimeZoneOffset(YourDateTimeColumn), Minutes) /* <-- YourDateTimeColumn represents the datetime column in your SQL table */

    Or

    DateAdd(YourDateTimeColumn, 5, Days)

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard