web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to add a date fiel...
Power Automate
Answered

How to add a date field to a sharepoint list from an excel table?

(0) ShareShare
ReportReport
Posted on by 2,295

I am trying to add items to a sharepoint list, from an Excel table.

 

One of the colums is date.

 

How to add dates?? The column in the sharepoint list if defined as date, but when of the records is empty, it breaks the flow with the error:

 

"Input parameter 'item/DataNascimento' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'."

Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at

    This can vary a lot depending on how the date fields are configured in Excel. The first thing you should do is put a compose action in your flow with the date field to see what is being returned. For example, if the dates in your spreadsheet look like 4/21/2023, you want to see if the Compose action returns the value 45037 (45037 equals 4/21/2023). If it does, you are dealing with an Excel serial date.

     

    You can then use a condition to see if the date field is empty. If it is, skip updating the date field in SharePoint. Otherwise you can convert the value to an ISO8601 date format, which is what the SharePoint list requires. You don't show your flow, so you will need to adapt this to your needs:

    David_MA_0-1682088627161.png

     

    The expression in the condition to check if the date is null is the following (if your column is not named "Date", you will need to update the expression to your column name:

     

    length(items('Apply_to_each')?['Date'])

     

     The expression to convert the Excel serial date to ISO format is:

     

    addDays('1899-12-30', int(items('Apply_to_each')?['Date']), 'yyyy-MM-dd')

     

    The result:

    David_MA_1-1682088818536.png

     

  • WebPortal Profile Picture
    2,295 on at

    @David_MA 

    Thanks a lot, this sure seems like a highly scientific issue 🙂

    I've checked the Excel file and I don't have an Excel serial date number.

    Simply, some rows are empty, and Power Automate breaks.

  • Verified answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at

    You can still use the expression I listed in the condition to check if the date field is empty so you can skip updating those ones. You will then need to get whatever you have in your Excel spreadsheet to return the dates in the ISO8601 date format, which is yyyy-MM-dd. If you can do those two things, you shouldn't have an issue.

  • WebPortal Profile Picture
    2,295 on at

    @David_MA 

    Thank you so much for your help and patience.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard