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 / Patch to Excel Date field
Power Apps
Answered

Patch to Excel Date field

(0) ShareShare
ReportReport
Posted on by 728

Hello,

 

I am trying to patch to a excel spreadsheet and when i try to patch to a field which is set to Date format, it is displaying yesterdays date even though i am saying Today() in the patch:

 

Patch(Kingsway,
LookUp(Kingsway,ID2 = Gallery1_2.Selected.ID2), {Status: "EMAILED",'Date Emailed': Today()})

Should display 16/05/2024 in excel column, but it displays 15/05/2024.


Is there something i am missing that may be causing this?

Categories:
I have the same question (0)
  • Verified answer
    v-yueyun-msft Profile Picture
    Microsoft Employee on at

    Hi , @neill_long 

    The Today() function  works with the local time of the current user. So for example it return 2024/5/17 00:00:00 in my side (UTC+8 ) today. When we patch to the Excel Date column, it will convert it to the UTC time in Excel. So when we use the Patch to add a row in excel ,  it will convert  2024/5/17 00:00:00 (UTC+8) --- >    2024/5/16 16:00:00   (UTC+0).

    So you need to use this expression in your app:
    Patch(Kingsway,
    LookUp(Kingsway,ID2 = Gallery1_2.Selected.ID2), {Status: "EMAILED",'Date Emailed': DateAdd(Today(), -TimeZoneOffset(), TimeUnit.Minutes)})

     

    If this reply can help you , you can click mark this reply as solution (Accept solution) which can help more people, thanks in advance! 

     

    Best Regards,

    Yueyun Zhang

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard