I am trying to format the date and time to look like 01/01/2023 08:00 am in power automate. I used the expression formatDateTime(triggerOutputs()?['body/receivedDateTime', 'MM/dd/yyyy hh:mm tt)
. The issue I'm having is that my outlook shows that the email I received is on '2/7/2023 5:00 pm' (this is also the format I want shown in excel) but on excel it shows '2/8/2023 0:00'. How can I convert the format to my desired format in power automate?
In the code snippet you shared there are a couple of typos. A closing square bracket is missing and a closing single quote character for the date time format is missing.
Can you try the expression below instead?
formatDateTime(triggerOutputs()?['body/receivedDateTime'], 'MM/dd/yyyy hh:mm tt')
Also check your inputs and outputs in the flow run to make sure it is formatted correctly by Power Automate.
Also double check the column formatting setting within Excel column. The value might be correct, but the formatting could be different.
Below in Cell B2 you can see the value shows AM, but the format of B is different.