Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Excel serial number conversion

(0) ShareShare
ReportReport
Posted on by 205

Hi all, 
I am trying to populate a sharepoint list using entries from Excel but am running into errors when the date column in Excel is blank.

In the list rows in Excel step, I have set the datetime format to be ISO8601 but it is still getting read as a serial number so I have been trying to use the follow formula:

if(empty(items('For_each')['Date Joined']), null, addDays('1899-12-30', int(items('For_each')['Date Joined'])))

but get the error  "Error details: Input parameter 'item/field_45' is required to be of type 'String/date'. The runtime value '""' to be converted doesn't have the expected format 'String/date'. when the Date Joined value is blank. I have used a Compose statement to ensure that it is returning null but it just doesn't seem to work. Any help would be very much appreciated.

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at
    Re: Excel serial number conversion

    Hi @ccqn ,

    I did a test for your reference.

    In my scenario:

    Please switch to classic designer.

    vyetonggumsft_5-1710816021834.png

    My Excel Table:

    vyetonggumsft_2-1710815645833.png

    I'm using the 'Apply to each' loop instead of 'For each'.

    When you quote my expression, remember to change the name of the 'Apply to each loop' to 'For each'.

    My Flow no ISO 8601 Format:

    vyetonggumsft_0-1710815422453.png

    vyetonggumsft_1-1710815524694.png

    if(empty(items('Apply_to_each')['Date']), null, addDays('1899-12-30', int(items('Apply_to_each')['Date']),'yyyy-MM-dd'))
    utcNow('yyyy-MM-dd')

     With ISO 8601 Format:

    vyetonggumsft_3-1710815858841.png

    vyetonggumsft_4-1710815955216.png

    if(empty(items('Apply_to_each')['Date']), null, formatDateTime(items('Apply_to_each')?['Date'],'yyyy-MM-dd'))
    utcNow('yyyy-MM-dd')

    Best Regards,

    Sunshine Gu

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1