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

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Conversion of SharePoint DateTime to Local Time

(0) ShareShare
ReportReport
Posted on by 530 Super User 2024 Season 1

I have a flow that might be triggered from 2 different time zones that exports JSON data to a CSV.

The JSON is coming from a SharePoint List which has a datetime field in it.  The date/time is correct when I'm looking at it in SharePoint (it's showing the local time for the field) but the JSON value that is being passed to my flow from Power Apps contains the information as UTC.

 

In the export, it is currently exporting as UTC.  Sometimes the field contains a date & time, and sometimes it's null.

I need the flow to export the information in local time.  I've tried setting it to utcNow(item()?['Scheduled_x0020_Interview']) but that still just exports it as UTC time.

 

What am I doing wrong?  I'm also getting errors when the field value is null.

 

Also not sure if the label for this post is correct - there is no option for Instant Flow so I picked Button Flow.

I have the same question (0)
  • ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Conversion of SharePoint DateTime to Local Time

    Hi @zuurg 

     

    You need to write an expression to check for null or empty value using if() function and use convertFromUtc() function to convert to local time zone if value of date time column is not empty.

    Pls try the below expression:

    if(empty(item()?['Scheduled_x0020_Interview']),'',convertFromUtc(item()?['Scheduled_x0020_Interview'],'India Standard Time'))

    Pls replace the time zone in the above expression as per your requirement.

     

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • zuurg Profile Picture
    530 Super User 2024 Season 1 on at
    Re: Conversion of SharePoint DateTime to Local Time

    Thank you, that worked for the time zone I'm in, but there's a chance that the flow will be triggered by someone who is in a different time zone.  Is there a way to compensate for that?  I'm in Central Standard Time and the other users would be in Mountain Standard Time.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard