Ok I'm having some sort of unsolvable issue with it comes to my datetime columns. I've tried everything I can think of and nothings working. What's even more frustrating is that I've done this before and it worked in the past. I still have the original automation and I even tried mimicking the entire automation which isn't much.
I have a manual trigger, Excel: list rows present in table, and SharePoint: Create Item. I've tried with ISO 8601 format and without with data manipulations in a compose statement to verify the values. Even then it says something is wrong. I even tried chat GPT, searched all over the internet and nothing is helping.
Error Message
The 'inputs.parameters' of workflow operation 'Create_item' of type 'OpenApiConnection' is not valid. Error details: Input parameter 'item/Last_Worked' is required to be of type 'String/date-time'. The runtime value '""' to be converted doesn't have the expected format 'String/date-time'.
With ISO 8601, I even tried this using an 'or' instead of a nested if.
if(
empty(item()?['Last Worked']),
null,
if(
equals(item()?['Last Worked'], ''),
null,
concat(
substring(item()?['Last Worked'], 0, 10),
'T',
substring(item()?['Last Worked'], 11, 8),
'Z'
)
)
)
Without ISO 8601, I even tried 'null' instead of '1899-12-30'
addSeconds(
addDays('1899-12-30', int(first(split(outputs('LastWorked'), '.')))),
int(
formatNumber(
Add(
mul(
float(concat('0.', last(split(outputs('LastWorked'), '.')))),
86400
)
,1
),
'#0')
)
)
Please help me, this is driving me crazy knowing it worked before.