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 / Format Date Time Issue
Power Automate
Answered

Format Date Time Issue

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

My current Date and time in Source Data (Same Date and Time in both the rows ) :  2021-03-30T16:00:00

The actual output should be in SharePoint List as : 03/30/2021 04:00 PM

My expression : 

 

 

if(empty(items('Apply_to_each')?['Date_Field']),null,formatdatetime((items('Apply_to_each')?utcNow()['Date_Field']),'MM/dd/yyyy hh:mm: tt'))​

 

 

My Current Output is (It shows Random time):
 DateTime.PNG
 
Any help will be appreciated. Thanks in Advance.

 

Categories:
I have the same question (0)
  • Sundeep_Malik Profile Picture
    6,501 on at
  • v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous 

     

    I suggest you to modify the formula to:

    if(empty(items('Apply_to_each')?['Date_Field']),null,formatDateTime((items('Apply_to_each')?['Date_Field']),'MM/dd/yyyy hh:mm tt'))​

     

    Best Regards,

    Levi

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    It again throws up a random time. But I have sorted it out.

     

    What I did was, I have converted the time from UTC-8 to my local time. and now it is working with my proposed formula (Which is in the question.)

     

    Thanks for all of your 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

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
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard