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 / Working with datetime ...
Power Automate
Answered

Working with datetime - different time in SharePoint and Planner

(0) ShareShare
ReportReport
Posted on by 50

My solution takes SharePoint Task list item and creates / updates Planner task item using this flow action:

timezone_flowAction.png

 

As you can see, I take SharePoint list item date value as read by Power Automate in previous step and simply write it to Due Date Time field of Planner task item, with no formatting or any data operation on it.

 

Now, having this SharePoint task list item dated 30.04.2020 ...

timezone_sharepoint-ui.png

 

… results into this Planner task

 

 

planner-ui.png

… and if we export both records to excel and compare datetimevalue, I get 7:07 or 6:06 difference, which leads me to some time-zone problem.

timezone_difference.png

I have found that both, SharePoint and PowerApps are set to same timezone, can not find any setting or post how to handle it within a flow.

Many thanks for any advice or link to solved solution which I did not find.

 

David

Categories:
I have the same question (0)
  • ChristianAbata Profile Picture
    8,953 Most Valuable Professional on at

    hi @DavidDostal  the principal reason is the time, see a new day starts in planner at 00:00:01 so what you need to do is add a time inside your day for example 04-30-2020T07:01:00Z

  • DavidDostal Profile Picture
    50 on at

    Thanks @ChristianAbata,

    yes, probably time issue. The source datetime value in SharePoint contains time information (30.4.2020 17:00) the resulting Planner Representation of that is NEXT day with no time info. I am not sure if I understand you,  what time should I add to what time. Might be I am not getting something, but the formula should look like PlannerDateStamp = SharePointDateTimeStamp - X:XX, if the solution is about time manipulation as Planner value is currently higher than SharePoint value?

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

    Hi @DavidDostal,

     

    I guess you're in the UTC+7 time zone, right?

    If so, it is caused by the when create the Planner task, the Due Date Time is considered as a UTC time:

    Annotation 2020-04-23 103938.png

    For time adjust, the timestamp will add 7 hours base on (30.4.2020 17:00).

    As a workaround, you could use the addHours() function to sub the Finish date 7 hours.

    addHours('TimeStamp',-7)

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • DavidDostal Profile Picture
    50 on at

    Many thanks, @v-litu-msft.

     

    as seen here, there are two difference values 07:07 and 06:06 (hours:minutes)timezone_differences_2.png

     

    Which motivates me to put together more general solution than adding some specific datetime value (my solution might be used in various timezones). I am going to try following solution:

    1. Get SP-DateTimeOriginal value (in local timezone)

    2. Set variable SP-DateTimeConverted (to Planner UTC)

    3. calculate difference between SP-DateTimeOriginal and SP-DateTimeConverted

    4. Write PL-DueDateTime = addHours(SP-DateTimeOriginal, result of 3)

     

    I will let the community know.

  • Verified answer
    DavidDostal Profile Picture
    50 on at

    Resolved. My previous plan did not work as Flow reads SharePoint's datetime local value already in UTC (e.g. Due Date in SharePoint 2020-07-17 is read as 2020-07-18 by flow.

     

    Therefore I read timezone info using HTTP request to SharePoint, take Bias value, convert it to hours and using addHours expression as recommended by @v-litu-msft and @ChristianAbata.

     

    It works:

    timezone_resolved.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

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard