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 / 2 PowerApps submit dif...
Power Apps
Answered

2 PowerApps submit different timestamps with the same code

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

When developing 2 apps for a QnA project I came across to this strange situation where 2 different Apps patch to the same SQL table with the same patch statement but the submitted timestamp is different between the apps.

Initially I thought it could be due to time zones as people could be submitting questions across the globe. In order to correct it, I guaranteed that the patch was always saving in UTC.

 Patch(
 '[dbo].[PERSONALCOACH_THREADREPLY]',
 Defaults('[dbo].[PERSONALCOACH_THREADREPLY]'),
 {
 PT_USER_ID: varCurrentUser.PRIMARYID,
 PT_THREAD_ID: galThread.Selected.PT_PRIMARYID,
 PT_DESCRIPTION: RichTextEditorThreadReply.HtmlText,
 PT_DATETIME: DateTimeValue(
 Text(
 Now(),
 DateTimeFormat.UTC
 )
 )
 }
 )



 In the app that UTC timestamp could later be transformed based on the users time zone using 

DateAdd(ThisItem.PT_DATETIME,-TimeZoneOffset(),Minutes)


When I ran some tests the results were positive in one App but when I tested on the other one the results were always ahead by 1 hour.

I have no clue on why this is happening. The code is the same and interacting with the same Data source.

The only difference that I could even find is that one App was created by me and the other app was created by a colleague whose time zone is actually 1 hour ahead of mine.

Categories:
  • mogulman Profile Picture
    764 on at

    What is the underlying datatype is SQL table? It should be datetimeoffset. 

     

    	[ModifiedDate] [datetimeoffset] NULL

     

    Update it with Now().  PowerApps take care of all offsets including DST.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    After a bit of digging I found out that the issue was in the App's advanced settings.

    The older app had the Enhanced Microsoft SQL Server connector disabled, and the newer one had it enabled.

    We disabled it on the newer one and the values are now matching.

    CJceWec.png

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 190 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard