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 / Conversion of SharePoi...
Power Automate
Unanswered

Conversion of SharePoint DateTime to Local Time

(0) ShareShare
ReportReport
Posted on by 546 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.

Categories:
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    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
    546 Super User 2024 Season 1 on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 425

#2
11manish Profile Picture

11manish 323 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard