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 Automate / Dates in the sharepoin...
Power Automate
Answered

Dates in the sharepoint list are off by a day when generated in an email via flow

(0) ShareShare
ReportReport
Posted on by 173

Issue: Some (not all) dates are piped into an email from a sharepoint list are incorrect (off by a day)

Here is my flow: 

oaghaei_0-1660264161137.png

Here is what I have for the deadline: 

formatDateTime(item()?['Deadline'],'MM/dd/yyyy')
 
This flow creates a list that I get in my email that looks like this: 
oaghaei_1-1660264331455.png

However, some dates are imported from Sharepoint correctly, while others are off by a day (one day later than they actually are). In the same example, the highlighted dates are behind one day. 

oaghaei_2-1660264425117.png

 

I wonder if this is because I need to convert the time? If so, is there a formula someone can help me figure out how to write it to ensure dates are all coming in correctly?

Thank you in advance!

 

Categories:
I have the same question (0)
  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @oaghaei ,

    please try to use the "Convert time zone" action:

     

    MarconettiMarco_0-1660285542404.png

     

     

    If I have answered your question, please mark my post as Solved.
    If you like my response, please give it a Thumbs Up.

    BR,

    Marco

  • oaghaei Profile Picture
    173 on at

    Hello @MarconettiMarco  thank you for your reply. I did try that in the past, but I ran into this error. Once I convert the time then i cant seem to be able to use "current item" that contains the converted time in the select function. 

    oaghaei_0-1660315782227.png

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @oaghaei, you should put the output form the previous action instead of the current item.

     

    BR,

    Marco

  • oaghaei Profile Picture
    173 on at

    @MarconettiMarco When I move all subsequent outputs into the previous action under "Apply to each", I end up with multiple emails (one per each line item), instead of in a table in one email.

    oaghaei_0-1660320073797.png

     

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

    Hi @oaghaei ,

     

    Maybe you could try to convert time zone using expression instead of Action. 

    https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#convertfromutc 

     

    I have made a simple test for your reference. 

     

    1. Here is my SharePoint list. 

    vyujincuimsft_0-1660629705315.png

    2. Here is my flow. 

    formatDateTime(item()?['Deadline'],'MM/dd/yyyy') 
    convertFromUtc(item()?['Deadline'],'Pacific Standard Time','MM/dd/yyyy') 
    convertTimeZone(item()?['Deadline'],'UTC','Pacific Standard Time','MM/dd/yyyy') 
    addHours(item()?['Deadline'],-7,'MM/dd/yyyy') 

    vyujincuimsft_2-1660629606522.png

    Result Screenshot: 

    vyujincuimsft_3-1660629606523.png

     

     

    Best Regards, 
    Charlie Choi 

  • oaghaei Profile Picture
    173 on at

    @v-yujincui-msft  Charlie, you are awesome! The expression is what I needed. I used the expression for Deadline 1. Now, can you tell me what is the purpose of the Deadline 2 and 3 expressions since they all produce the same outcome? Or are they all different ways of getting to the same result? I wonder if you have a preference. 
    Again, thank you so much!!

  • v-yujincui-msft Profile Picture
    Microsoft Employee on at

    Hi @oaghaei ,

     

    I just want to give you more options, all three expressions are available. I prefer to use the first, followed by the second.

     

     

    Best Regards,

    Charlie Choi

  • oaghaei Profile Picture
    173 on at

    @v-yujincui-msft  - got it, makes sense. Thanks so much again!! I appreciate it. 

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 Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard