I have a flow which gets data from an Excel table and either updates the SharePoint list or creates new rows.
As the dates are always a problem, I created variables for each date and the formula for these were:
if(isInt(items('DateColumn']), addDays('1899-12-30', int(items('Apply_to_each_2')?['column']), 'yyyy-MM-ddTHH:mm:ss.fffffffK'), items('Apply_to_each_2')?['column'])
Then in the Update Item for the SharePoint list I had for each date:
if(empty(outputs('Compose_date_variable')), null, outputs('Compose_date_variable'))
This worked absolutely fine if the date came through as an integer like this 45586, or as an actual date (as it sometimes could) or if it was blank.
The problem is I'm using this flow with another Excel table and some dates are coming through with a date and time. Even if we format them in the Excel table as custom dd-MM-yyyy or short date, the time is retained and outputs to PA like this: "45587.3281621875".
For some reason, this isn't recognised as an integer and so the variable is set to this same number with decimal points. If it was an integer I could use an addSeconds formula instead of addDays but instead I think I need a condition.
Has anyone got any ideas how I can do this in the most uncomplicated way? Attaching an image of part of my current flow to get an idea.