Forum Discussion
Read SharePoint List and Converst String to Date
suvi-15 your formatDateTime is incorrect as in Power Automate months are formatted with capital Ms. Lowercase ms are for minutes.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Hi RobElliot
Thank you.
I know changed it to MM but still does not work.
Thank you
Regards
JFM_12
- JFM_12Sep 06, 2021Iron ContributorHello
I tried to use this as formula:
addDays('30-12-1899',int(items('Auf_alle_anwenden')?['Start Date']),'dd-MM-yyyy')
But got following error:
" InvalidTemplate. Unable to process template language expressions in action 'Start Date' inputs at line '1' and column '2795': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'. "
I know there are many of this posts.
Read them but....
JFM_12- suvi-15Sep 07, 2021Brass Contributor
Hi JFM_12 ,
as you proceed this much i think you must be already using action for Excel(file may be present in Sharepoint Documents or actual loaction).
addDays('30-12-1899',int(items('Auf_alle_anwenden')?['Start Date']),'dd-MM-yyyy') in this what exactly you were trying to do because if i understood correctly [Start Date] must be date format and you are trying to convert it to int which results error.(The template language function 'int' was invoked with a parameter that is not valid)
at place of items('Auf_alle_anwenden')?['Start Date'] use integer value.
- JFM_12Sep 07, 2021Iron ContributorHello Everbody
Thank you for your replies. Sorry for the confusion.
At the beginning and excel is sind to a sharepoint library (Date is string)
The Excel is stored in the format of a table.
This Excel is the filled in a sharepoint list
Now the column on that list is a string. I would like to fill the column as date format (dd.MM.yyyy).
I omitted this, sorry.
Regards
JFM_12
- RobElliottSep 06, 2021Silver Contributor
JFM_12 your first post said you were using a SharePoint list but now you are talking about getting the dates from Excel. Which is it as it affects the answer?
Rob
Los Gallardos
Microsoft Power Automate Community Super User