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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Handling Blank Date C...
Power Automate
Unanswered

Handling Blank Date Columns in Excel-to-SharePoint list Power Automate Flow

(0) ShareShare
ReportReport
Posted on by 53
Hello Team, Hope you are doing great.
 
I did a schedule flow where it add and update excel data to sharepoint list. I have 2 columns in the excel that are in date format.
 
On the sharepoint list, I have put the 3 columns in date format as well.
 
On the PowerAutomate, I have put a function on the date columns.. Please find the screenshot below:
 
 
The function for extraction date is: formatDateTime(addDays('1899-12-30', int(items('Apply_to_each')?['Extraction Date'])), 'yyyy-MM-dd').
 
The issue is if a row in the date columns  is blank, the automation will get error. Is it possible to put null(), or something on the blank columns in microsoft list. Then, when they update the row in the excel, then on the automation, the row will be updated.
 
Can someone please help me with this.
 
Thank you.

 

Categories:
I have the same question (0)
  • DJ_Jamba Profile Picture
    2,837 Moderator on at
    Just check for nulls by changing the expression:
     
    if(
    	equals(items('Apply_to_each')?['Extraction Date'], null),
    	null,
    	formatDateTime(addDays('1899-12-30', int(items('Apply_to_each')?['Extraction Date'])), 'yyyy-MM-dd')
    )
     
  • Building with Why Profile Picture
    351 Moderator on at
    You are probably getting a null in this scenario, but if the below answer does not work I would substitute string('') instead of null in the equals statement.  The formatDateTime function does not handle non-date text strings and the error for null and blank can look the same.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 959

#2
Valantis Profile Picture

Valantis 872

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard