Skip to main content

Notifications

Power Automate - General Discussion
Answered

Format Date Time Issue

(0) ShareShare
ReportReport
Posted on by

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:
  • Verified answer
    Re: Format Date Time Issue

    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.

  • v-liwei-msft Profile Picture
    v-liwei-msft on at
    Re: Format Date Time Issue

    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

  • Sundeep_Malik Profile Picture
    Sundeep_Malik 6,480 on at

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard