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 / Excel serial number co...
Power Automate
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.

Categories:
I have the same question (0)
  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    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

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard