web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Change Time Zone Withi...
Power Automate
Unanswered

Change Time Zone Within Flow to Update SharePoint List Items

(0) ShareShare
ReportReport
Posted on by 658

Hi,

 

I have created a formula within a sharepoint list which identifies if the end time of the item has expired, this is compared against the real time. I have managed to get a flow working which runs every 5 minutes so it updates the 'expired' column within the sharepoint list, the only issue is the sharepoint list is only setting the items to expire 8 hours from the real time. So it will only update the expired column when the end time of item is 15:10 and the real time is 23:10. Is there a way this can be fixed within the flow? 

 

Thanks in advance!

Categories:
I have the same question (0)
  • DB7176 Profile Picture
    12 on at

    Hello, I had an issue with submitting datetime (24hr) to a sharepoint list datetime column and it changing the time to 7 hours earlier.  My SharePoint global time zone and site time zone was correct but it still was changing the submitted time.  In the flow the datetime was a string so not sure if that was the problem.  Tried changing the format and even converting to the proper time zone and still no go.  What I ended up doing is using "Add to time" and adding 7 hours to the datetime and worked like a charm.  So it would be something like...

     

    datetime variable -> Add to Time - Choose your datetime variable - add the hours in the field provided -> use your Add to Time as the output.  You can also use subtract.

     

    I know this is a work around but I couldn't find the cause of the issue.  Hope this helps.

  • BS10 Profile Picture
    658 on at

    Hi @DB7176,

     

    Thanks for the response! Could you please share some pictures of your flow? I am unsure where to add the 'Add to time' property and also unsure what needs to be used as the 'Base time'.

     

    Thank you!

  • DB7176 Profile Picture
    12 on at

    My datetime is coming from an email attachment.  Attachment is a pipe delimited file and one of the fields has the datetime.  If you are creating the base datetime in the flow using like UtcNow expression that will work as well.  The below depiction shows the trigger as "when a new email arrives".  Instead of going through the whole process of showing the converting the attachment, splitting the lines, and splitting the fields, I'm just showing a variable and the Add to time.  You can then add your SharePoint connection..create item and input "Add to time" as a field. Hope this helps.

     

    DB7176_0-1693610721205.png

    Output is 8/31/2023 4:30 PM

     

     

     

  • BS10 Profile Picture
    658 on at

    Hi @DB7176,

     

    Not sure on what I need to set as the value within my DateTime variable as my content is coming from the SharePoint list. Please see picture of my flow which works and updates the column I would like but it does it 8 hours too late.

     

    BS10_0-1693611824145.png

     

    Thank you!

  • DB7176 Profile Picture
    12 on at

    Hi @BS10,

    This is a little out of my depth. I'm pretty new to Power Automate.  I'm C sharp developer.

     

    Can you provide some additional detail regarding how the SP list is being populated before flow triggers?

     

    How are the records first being populated?  Is it during the original item creation that the end time is calculated?  Can you explain this preprocessing - original item creation?  Give names of columns, like created, expired (calculated field?), end time (blank? to be populated using Power Automate?).

     

    Hopefully, someone with more experience can chime in and provide options.

  • Verified answer
    BS10 Profile Picture
    658 on at

    Hi @DB7176,

     

    I have managed to solve the issue, I added the ‘get time’ feature after the trigger and added this in a condition after ‘get items’. I added the end time as the value and used ‘is less than’ and then used the current time. Then added an if yes - update item to expired or if no - pending.

     

    Thank you for the help! 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard