I have a flow that parses information from the body of an email and adds it in a new row in excel. The problem that I am having is that the date/time is going in as a string.
The date/time comes from the first line of the email: "An order was placed for the following product(s) on 17/03/2022 20:28:14."
This is what I'm doing:
1. Pull out the date and time

2. Initialize a date/time variable as string

3. Split into date and time

4. Split the date into dd, mm and yyyy components

5. Create a string combining the date and time components into ISO format (I have tried with and without formatDateTime() - makes no difference)

6. Insert into excel

This all works well, except that the date and time go in to excel (on sharepoint) as a string (align to the left):

If I then double click on the relevant cell it turns in to a date.
If anyone can suggest how to ensure that this goes in as a date, or can suggest a better way of constructing the date and time, I appreciate any advice.