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'))​
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.
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
@Anonymous
Check this out, if it helps.