Forum Discussion
TSimsD
Aug 27, 2020Copper Contributor
Importing dates from Excel into Sharepoint list
Hi, I've tried various forums for answers to this issue but none have succeeded. I have an extensive spreadsheet that I want to import a Sharepoint list. The issue is the date column. irrespective o...
sumitarjandas
Jan 06, 2021Copper Contributor
Hello RobElliott
I have the same scenario as your solution and have tried your expression in my workflow. However, I am getting an error:
"Unable to process template language expressions in action 'ComposeFormatExcelDate' inputs at line '1' and column '9734': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."
Can you assist?
DairyG1
Jul 15, 2021Copper Contributor
sumitarjandas - Did you get a resolution on the issue?
"Unable to process template language expressions in action 'ComposeFormatExcelDate' inputs at line '1' and column '9734': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."
"Unable to process template language expressions in action 'ComposeFormatExcelDate' inputs at line '1' and column '9734': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'."
- BusyIntelligenceJul 16, 2021Brass ContributorHi, I've imported lots of Excel files with dates in it.
The expression I use succesfully is:
addDays('1899-12-30',int(items('Apply_to_each')?['Date']),'yyyy-MM-dd')- DairyG1Jul 16, 2021Copper Contributorthanks for the response and yeah that works but its when the date field is blank is what the issue is for me. tried numerous if equal/empty etc, cannot get to work so far
- BusyIntelligenceJul 16, 2021Brass ContributorHi, if it is okay to have an empty value in the SP list you could try:
if(empty(items('Apply_to_each')?['Date']), null, addDays('1899-12-30',int(items('Apply_to_each')?['Date']),'yyyy-MM-dd'))