While working for an organization that uses Salesforce, I was assigned the task of assigning the next available date to a client. To fulfill this requirement, I define an advanced formula that checks for null values in dates.
In this Salesforce tutorial, I will demonstrate how to check for null values in dates within Salesforce. We will see the Salesforce formula field to check null values for dates in Salesforce.
Salesforce Formula to Check the Date Field is Null
We track various activities in Salesforce, such as when a record is created, when a payment is due, or when a task is modified, and for all such activities, we utilize date fields.
We developed an advanced formula to determine whether a date field is null or not. Essentially, it facilitates the smooth operation of business processes, enables accurate data analysis, and ensures data standards are maintained.
To check if a date field is null, we utilized the ISBLANK function of Salesforce. And by default, if the entered date field is null, this function returns a boolean value of true; otherwise, it returns a value of false.
Here is the syntax to check if a date field is null in a formula field:
ISBLANK(Date_Field)In the above syntax, Date_Field is the API name of the date field that we want to check if it is blank.
Let’s understand this concept with the help of an example:
Suppose we are working as a sales manager, and we are responsible for monitoring Salesforce Leads. One day, we noticed that some of the leads were missing a Close Date.
To confirm this, we decided to identify if any of the Close Dates are null. So, for this, we create an advanced formula given below:
IF(ISBLANK(CloseDate), "Lead Miss the Close Date", "Lead Has Close Date")With this, we now know about the Salesforce formula to check if a date field is null. Next, we will proceed to learn how to check if the date field is null in Salesforce Lightning.
Check If the Date Field Is Null in Salesforce Lightning
Here are the steps to define a formula that checks if the date field is null in Salesforce Lightning:
- Click the Setup icon in the top right corner of the page to access Salesforce Setup.
- Click Object Manager from the menu’s left side.

- Look for the item to which we want to check if the date field is null. I chose the Product object from the list of objects in this instance.

- Choose Fields & Relationships. Next, select New.

- Select “Formula” as the field type. Click Next to proceed.

- After entering a Field Label for the formula, the Field Name will be filled in automatically. Here, I enter the Field Label as Delivery Status. Select Text as the Formula Return Type. After that, click Next.

- Enter the check if the date field is the null formula in the Advanced Formula editor. Here is the formula:
IF(ISBLANK(Delivery_Date__c), "Product has not been delivered yet", "Product was delivered on " & TEXT(Delivery_Date__c))
- In this formula, we check if the Delivery Date field on a product is null or not, and display a message accordingly.
- To check if the Delivery Date field is null, we use the ISBLANK function.
- If it is null, the formula returns the text “Product has not been delivered yet”.
- Otherwise, the formula returns the text “Product was delivered on” with the Delivery Date value. To convert the delivery date value, we used the TEXT function.
- Then, to connect the delivery date with the text message, we use the & operator.
- To verify that the formula is valid, click Check Syntax. We can specify how you want to handle the empty field and include the Description and Help Text as alternatives.
- Then, select Next.

- Select the appropriate Field Level Security, and to make it visible to everyone, we select the Visible checkbox.
- Select Next.

- Select the Page Layout Name for which the formula field is to be added.
- Click Save to save the formula field.

- We can use the formula field once it has been created. Let’s look at an example:
- Create a Product with the Delivery Date field by opening the Products item and saving it.
- After that, click on the Details section, and here the Delivery Status field appears, which checks if the date field is null.


As a result, we now know how to use Salesforce Lightning’s advanced formula to check if the date field is null. Now, we’ll look at how to use the advanced formula in Salesforce Classic to check if the date field is null.
Conclusion
In conclusion, we learned the advanced Salesforce formula to check if the date field is null in Salesforce.
Moreover, we have learned that both Salesforce Classic and Salesforce Lightning offer a straightforward procedure for determining whether a date field is null or not.
You may also like the following Salesforce tutorials:
- Salesforce Formula Date Greater Than Today
- Salesforce Formula Date Greater Than Specific Date
- Salesforce Formula Date Less Than Today
- Remove comma from number field Salesforce
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.