Hi Flow experts and community, I am planning to Flow update the data from Excel to Sharepoint List, but I am having trouble with
the Next Due Date column (integer/string issue). After spending some times in the forum, I finally found this expression: if(empty(item()['Next Due Date']),null,addDays('1899-12-30',int(item()['Next Due Date']),'yyyy-MM-dd'))
However, now I encountered this error:
Can you guide me on the way forward for this as this is my first Flow?
is it because in Sharepoint, the format is DD/MM/YYYY, while Excel format is MM/DD/YYYY? I have more than 1000 items.
Or is there any other better way to solve the string/integer date issue?
I attached the screenshot of my Flow as reference.
Thank you.
Regards,
Nawi
Solved! Go to Solution.
Hi @M_Asnawi ,
The expression in the Compose 2 should as below:
formatDateTime(addDays('1900-01-01', add(int(items('Apply_to_each')?['Next Due Date']),-2)), 'yyyy-MM-dd')
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @M_Asnawi ,
The expression in the Compose 2 should as below:
formatDateTime(addDays('1900-01-01', add(int(items('Apply_to_each')?['Next Due Date']),-2)), 'yyyy-MM-dd')
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I've tried the suggested solution, however the error is still the same.
I attached the used expression.
Is there any other way for this? Or would you require me to provide more details on this?
Thank you.
Regards,
Nawi
Hi @M_Asnawi ,
Please make sure the Next Due Date column for all the rows in your excel table would be valid date time then your issue would be solved, the column value couldn't be null.
Or you could add a Condition to check if the Next Due Date is equal to null as my screenshot below:
The expression in the Condition 2:
empty(outputs('Compose_2'))
The expression in the Compose 3:
formatDateTime(addDays('1900-01-01', add(int(outputs('Compose_2')),-2)), 'yyyy-MM-dd')
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @M_Asnawi ,
Please take a try and let me know if your problem has been solved.
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-alzhan-msft ,
I've tried it already, but my problem was still not solved.
Then, I changed the Excel date format to YYYY-MM-DD, suddenly it works. I guess this will be a good sharing to whoever going to read this in the future.
However, under normal condition, your expression works. I consider Accept it as the solution to help the other members find it more quickly.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
User | Count |
---|---|
32 | |
31 | |
24 | |
24 | |
20 |
User | Count |
---|---|
60 | |
57 | |
43 | |
37 | |
28 |