How to Check if a Date Is Blank in Power Automate

An HR coordinator I helped had an onboarding flow that sent new hires a welcome email with their start date. It worked for months, until someone added a new employee before the start date was confirmed. The flow failed with an error about a null value, and nobody noticed for a week. One blank-date check would have caught it.

In this tutorial, I’ll show you the check I use for blank dates from SharePoint, Microsoft Forms and variables, how to format a date without errors, and how to fill in or clear a date column.

Quick answer: Use empty(). It returns true for both null and empty text, so it works for SharePoint dates, Forms answers and variables: empty(triggerBody()?['JoiningDate']). In a Condition, compare it with the expression true. Before formatting a date that might be blank, guard it: if(empty(x), '', formatDateTime(x, 'MM/dd/yyyy')).

Why blank dates break flows

When a SharePoint date column is empty, the flow gets null (or no value at all). Many functions can’t handle null. formatDateTime(), for example, fails with an error that starts with InvalidTemplate. Unable to process template language expressions and ends with The provided value is of type ‘Null’.

Other sources send an empty string, '', instead of null. That’s why I use empty(): Microsoft documents that it returns true for both. The one thing it can’t check is a number; use it on text, dates, arrays and objects.

SourceBlank valueCheck
SharePoint date columnnullempty(triggerBody()?['JoiningDate'])
Microsoft Forms date questionUsually empty textempty(variables('varFormDate'))
String variableEmpty text (null becomes ” in a string variable)empty(variables('varJoiningDate'))
Parse JSON outputnullempty(body('Parse_JSON')?['DateField'])

The ? in triggerBody()?['JoiningDate'] matters too. It returns null instead of failing when the property is missing.

Method 1: Check a SharePoint date and fill it in

This Employee Onboarding list has a Joining Date column. If someone adds an employee without a date, the flow should set it to today, so there’s always something to work with:

SharePoint Employee Onboarding list with a Joining Date column

Step 1: Create the flow

Create an automated cloud flow with the SharePoint trigger When an item is created, and select your site and list:

When an item is created trigger with the Employee Onboarding list selected

Use When an item is created here, not created or modified. The flow updates the item, and a modified trigger would fire again on its own update.

Step 2: Check the date with empty()

Select + > Add an action, search for Compose, and enter this expression in Inputs (select fx or type /):

empty(triggerBody()?['JoiningDate'])
Compose action with the empty expression on the Joining Date column

Use your column’s internal name. If it has a space, it may look like Joining_x0020_Date; the dynamic content shows the right name if you add the column and switch to code view.

Step 3: Add a Condition

Add a Condition. Put the Compose Outputs on the left, choose is equal to, and on the right, enter true as an expression. If you type it as plain text, you’re comparing against the word “true”, and the condition never matches:

Condition comparing the Compose outputs with the expression true

Step 4: Set the date in the True branch

In True, add Update item. Select the site and list, set Id to the trigger’s ID, and set Joining Date to utcNow(). Leave False empty, or add the actions for items that already have a date:

Update item action in the True branch setting Joining Date to utcNow

Step 5: Test it

Save, select Test > Manually > Test, and add an item without a date:

New Employee Onboarding item added without a Joining Date

The run takes the True branch, and the Update item fills in today’s date:

Successful flow run with the True branch and the list showing the new Joining Date

Method 2: Format a date that might be blank

Most blank-date errors happen when you format the date for an email or a file name. Guard formatDateTime() with if(), so it only runs when there’s a date. Add Initialize variable, name it varJoiningDate, choose String, and use this expression:

if(empty(triggerBody()?['JoiningDate']), '', formatDateTime(triggerBody()?['JoiningDate'], 'MM/dd/yyyy'))
Initialize variable action named varJoiningDate with an if expression

The variable holds the date in US format, such as 03/16/2026, or empty text when there’s no date. Use capital MM for the month; lowercase mm is minutes.

Now you can check the variable in a Condition. With varJoiningDate on the left and is equal to, leaving the right side empty compares it with empty text. Or put empty(variables('varJoiningDate')) on the left and the expression true on the right, which is easier to read:

Condition checking the varJoiningDate variable with Compose actions in the True and False branches

In my test, each branch writes a message with a Compose action. The blank item goes to True, and an item with a date goes to False:

Run results showing the date value is blank in the True branch and not blank in the False branch

Method 3: Dates from Microsoft Forms

For an optional date question, use the When a new response is submitted trigger and Get response details. I store the answer in a String variable called varFormDate:

Initialize variable action storing the Start Date answer from Microsoft Forms

Check it with empty(variables('varFormDate')) is equal to the expression true. Don’t type two quote marks into the Condition’s value box; that’s the text "", not an empty value. For more Forms examples, see how to add a condition based on a Forms response.

Method 4: Use coalesce() for a default value

coalesce() returns the first value that isn’t null, which is handy for defaults:

coalesce(triggerBody()?['JoiningDate'], utcNow())

It only skips null, though, not empty text. For a value that might be either, use if() and empty() instead: if(empty(x), utcNow(), x).

How to clear a SharePoint date

To empty a date column with Update item, set the field to the expression null. Don’t use empty text; SharePoint rejects it with an error that the value isn’t in the expected date format. Leaving the field empty in Update item usually leaves the existing date unchanged, so test it with your own list before you rely on it.

To find items with blank dates before the flow processes them, filter Get items with JoiningDate eq null. See Power Automate filter query if blank for all column types.

Common errors

  • The provided value is of type ‘Null’. A function like formatDateTime() got a blank date. Use the if(empty()) pattern from Method 2.
  • The Condition never matches. You typed true or null as text. Enter them as expressions.
  • The check works for SharePoint but not Forms. You compared with null. Use empty(), which covers both.
  • The flow runs twice. The trigger is created or modified, and your Update item changed the item. Use When an item is created, or add a trigger condition.

These tutorials cover other blank-value checks in Power Automate:

Frequently Asked Questions

How do I check if a date is empty in Power Automate?

Use empty(), which returns true for null and empty text, for example empty(triggerBody()?[‘JoiningDate’]). Microsoft covers empty() in its expression cookbook.

Why does formatDateTime fail on a blank date?

It can’t format a null value. Wrap it: if(empty(x), ”, formatDateTime(x, ‘MM/dd/yyyy’)).

Does a blank SharePoint date come through as 1/1/1900?

No. A blank SharePoint date arrives as null. A 1/1/1900 value only appears if someone or something saved that date.

How do I clear a SharePoint date column with Power Automate?

In Update item, set the date field to the expression null. Empty text causes a date format error.

What’s the difference between null and empty text in Power Automate?

Null means no value; empty text is a string with nothing in it. A null stored in a String variable becomes empty text. empty() returns true for both.