Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Converting a SharePoint list date to correct time zone for an Excel spreadsheet

(0) ShareShare
ReportReport
Posted on by 195

Hi,

I'm running a scheduled flow that creates an worksheet of specific items in a SharePoint List.

 

The trouble I am having is that the SharePoint list is correct in it's regional timezone (UTC +8) in a column which has the Task Completed date and time (column formated to date and time), however when getting the date results  in the spreadsheet it changes to the date to be UTC. I've played around with trying to use an expression to convert the time zone which I've had no luck with:

 

formatDateTime(convertTimeZone(utcNow(), 'UTC', 'W. Australia Standard Time’), 'dd/MM/yyyy HH:mm:ss')

 

I have also tried the action convert time zone but I am getting no where and need to ask everyone out there for help!

 

Screen shot of part of my current flow. It is the select action of 'Date Completed' that currently often changes it to the day before:

Current expression used is: 

formatDateTime(item()?['TaskCompleted'],'dd/MM/yyyy')

 

roxy1_0-1671583292663.png

 

An example of an item in the SharePoint list with the task completed date and time of (annoyingly in formate of MM/dd/yyyy):

roxy1_1-1671583542404.png

 

And result when it has been added to the spreadsheet and emailed (date only is required for the results):, it has changed the date to the date before!

 
roxy1_0-1671583769481.png

 

 

  • DavyBruny Profile Picture
    5 on at
    Re: Converting a SharePoint list date to correct time zone for an Excel spreadsheet

    Thanks for sharing the addHours function.  I used it as the basis for this expression to try to handle Daylight Savings time in EST:

    if(and(or(and(equals(substring(utcNow(),5,2),'03'),equals(substring(utcNow(),8,2),'12')),greater(substring(utcNow(),5,2),'03')),or(and(equals(substring(utcNow(),5,2),'11'),equals(substring(utcNow(),8,2),'05')),less(substring(utcNow(),5,2),'11'))),addhours(convertFromUtc(utcNow(),'Eastern Standard Time'),4,'M-d-yyyy h:m tt'),addhours(convertFromUtc(utcNow(),'Eastern Standard Time'),5,'M-d-yyyy h:m tt'))

    to add 4 hours when Daylight Savings Time and 5 hours otherwise. It has to be updated each year since Daylight Savings Time changes a few days.

  • Verified answer
    roxy1 Profile Picture
    195 on at
    Re: Converting a SharePoint list date to correct time zone for an Excel spreadsheet

    Hi @Amit_Sharma I've managed to solve my own query!

     

    I used expression 

    formatDateTime(addhours(item()?['TaskCompleted'],8),'dd/MM/yyyy')
     
    (Where task completed is the column, and 8 is the amount of hours my time zone is ahead of UTC!)
  • roxy1 Profile Picture
    195 on at
    Re: Converting a SharePoint list date to correct time zone for an Excel spreadsheet

    Hi @Amit_Sharma thanks for your suggestion. This expression works when testing in a compose action.

     

    I need to apply it to change the date of the 'Task Completed' column, for all items. Can I somehow add this in there?

  • Amit_Sharma Profile Picture
    1,569 Super User 2024 Season 1 on at
    Re: Converting a SharePoint list date to correct time zone for an Excel spreadsheet

    Hi @roxy1 

    Try With ConvertFromUtc() Function.

    convertFromUtc(utcNow(), 'W. Australia Standard Time', 'dd/MM/yyyy HH:mm:ss') 

     

    Using one Compose Action Please Confirm In your flow It Convert Perfectly.

     

    Best Regards.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492