cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ajaysaba
Frequent Visitor

Format Date Time Issue

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

3 REPLIES 3
Sundeep_Malik
Community Champion
Community Champion
v-liwei-msft
Community Support
Community Support

Hi @ajaysaba 

 

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

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.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,337)