Search code examples
salesforcesoql

Checking for Blank Date field in Salesforce


How do I check if a field is Blank in Salesforce using SOQL.

Thanks


Solution

  • SOQL has support for NULL values, so you should be able to query as you do with regular SQL. For example:

    SELECT column
    FROM table
    WHERE date_field = NULL
    

    Notice the use of = NULL instead of IS NULL as you would find in SQL.