A sales manager once asked me why their Opportunity follow-up report still showed tasks that were already overdue. The records had due dates, but nobody added logic to compare those dates with the current day.
That is exactly where the Salesforce TODAY function helps. I use it often in Sales Cloud and Service Cloud projects to flag overdue work, calculate how long a record has been active, validate dates, and drive time-based decisions without changing data manually.
This guide shows how the Salesforce TODAY function works, where to use it, and practical formulas you can copy into your own org.
What Is the Salesforce TODAY Function?
The Salesforce TODAY function returns the current date when Salesforce evaluates a formula, validation rule, Flow formula resource, report filter, or other supported expression.
Its syntax is simple:
TODAY()
The function takes no parameters. Salesforce returns a Date value, such as 09/11/2026, based on the time zone configured for the running user or the relevant Salesforce context.
For example, if today is September 11, 2026, this formula returns:
TODAY()
09/11/2026
The important point is that TODAY() does not save a fixed date. It always evaluates as the current date. If you open the same record tomorrow, a formula using TODAY() can show a different result.
That makes it useful for live statuses such as:
- Number of days since a lead entered the pipeline
- Whether a support case is overdue
- Whether a contract expires today
- Whether an opportunity follow-up date has passed
- Whether users entered a future date when they should not have
Salesforce TODAY Function Syntax
The Salesforce TODAY function uses this syntax:
TODAY()
You do not add a field name, date value, or argument inside the brackets.
Here are common ways to use it:
| Use case | Example formula | What it does |
|---|---|---|
| Calculate days since a date | TODAY() – Activation_Date__c | Returns the number of days since activation |
| Check for an overdue date | Due_Date__c < TODAY() | Returns true when the due date is before today |
| Check whether a date is today | Follow_Up_Date__c = TODAY() | Returns true when the follow-up date is today |
| Check for a future date | CloseDate > TODAY() | Returns true when the close date is after today |
| Add days to today | TODAY() + 30 | Returns the date 30 days from today |
| Calculate days remaining | End_Date__c – TODAY() | Returns the number of days until the end date |
The Salesforce TODAY function works best with Date fields. A Date field stores only a calendar date, such as September 11, 2026. A Date/Time field stores both date and time, such as September 11, 2026, at 4:30 PM.
If your source field is a Date/Time field, convert it before comparing it with TODAY():
DATEVALUE(CreatedDate) = TODAY()
This formula converts the CreatedDate Date/Time value into a Date value before comparing it with the current date.
Where You Can Use TODAY() in Salesforce
I regularly use TODAY() in four areas: formula fields, validation rules, Flows, and reports. Each option solves a different business need.
Formula Fields
A formula field calculates a value automatically from other fields or functions. Salesforce does not store the calculated result in the database. It calculates the value when someone views the record or accesses it in supported contexts.
Formula fields work well when you need a live value, such as “days open,” “overdue,” or “contract status.”
For example, a sales team with 20 account executives may want to see how many days each opportunity has stayed open.
Create a Number formula field on the Opportunity object:
TODAY() - DATEVALUE(CreatedDate)
This formula subtracts the Opportunity created date from today’s date. The result is the number of days since the rep created the opportunity.
If an Opportunity was created on September 1 and today is September 11, the formula returns:
10
This helps sales managers identify stalled opportunities before the pipeline becomes unreliable.
Validation Rules
A Validation Rule prevents users from saving a record when specific conditions are true. It protects data quality by stopping invalid values when users enter data.
For example, your sales team may need to record a past or current customer contact date. You do not want a rep to accidentally set the Last Contacted Date to a future day.
Use this validation rule formula on the Lead or Contact object:
Last_Contacted_Date__c > TODAY()
Set an error message such as:
Last Contacted Date cannot be in the future.
When a user enters a date later than today, Salesforce blocks the save and shows the message.
You can also use TODAY() to control date logic during record updates. For example, on a custom Project object, you may want to prevent users from setting a project end date before the start date or in the past.
OR(
End_Date__c < Start_Date__c,
End_Date__c < TODAY()
)
This formula stops users from saving a project with an invalid end date.
Flow Formula Resources
A Flow is Salesforce’s no-code automation tool. A record-triggered Flow runs when users or integrations create or update a record. You can use TODAY() in Flow formulas, Decision elements, and entry conditions.
For example, consider a Service Cloud support team handling 500 customer cases every month. The team wants Salesforce to raise the priority of open cases that have passed their target resolution date.
Create a record-triggered Flow on the Case object with these high-level settings:
- Go to Setup and search for Flows.
- Click New Flow.
- Select Record-Triggered Flow.
- Choose the Case object.
- Set the flow to run when a record is created or updated.
- Choose Actions and Related Records if the Flow needs to update fields or create related records.
- Add a Decision element to check whether the case is overdue.
Use this condition in the Decision element:
$Record.Target_Resolution_Date__c < $Flow.CurrentDate
In Flow, $Flow.CurrentDate is the practical equivalent of TODAY().
If the date is earlier than the current date and the case remains open, update the Case Priority field to High.
You can also use a formula resource for more complex logic:
AND(
NOT(ISBLANK({!$Record.Target_Resolution_Date__c})),
{!$Record.Target_Resolution_Date__c} < {!$Flow.CurrentDate},
NOT(ISPICKVAL({!$Record.Status}, "Closed"))
)
This logic checks three things:
- The target resolution date contains a value.
- The target date is before today.
- The case status is not Closed.
The Flow should only change the priority when all three conditions are true.
Pro Tip: I have found that date-based formulas often fail because teams forget to handle blank date fields. Always test blank values before comparing a custom date field with TODAY() or $Flow.CurrentDate.
Reports and Report Filters
A Report helps users analyze Salesforce records with filters, columns, groupings, and charts. You can use relative date filters to show records due today, overdue records, or records created recently.
For example, create an Opportunities report for a sales manager who wants to see follow-ups due today.
Use a report filter like:
Next Step Date equals TODAY
For overdue tasks, use a filter such as:
Due Date less than TODAY
Salesforce report filters provide relative date choices, so you may not always need to type a formula. However, understanding TODAY() helps when you build custom formula fields that report on live statuses.
A useful approach is to create a text formula field named Follow-Up Status on the Task or custom Activity object:
IF(
ISBLANK(Follow_Up_Date__c),
"No Follow-Up Date",
IF(
Follow_Up_Date__c < TODAY(),
"Overdue",
IF(
Follow_Up_Date__c = TODAY(),
"Due Today",
"Upcoming"
)
)
)
This formula returns one of three useful statuses:
- Overdue when the follow-up date has passed
- Due Today when the date matches today
- Upcoming when the follow-up date is in the future
The formula also handles blank dates. That small detail keeps your report from treating missing dates as valid activity records.
How to Create a TODAY() Formula Field in Salesforce
Let’s build a practical formula field on the Contact object. The field will show the number of days since a customer activation date.
Assume your Salesforce org stores an Activation Date in a custom Date field named Activation_Date__c.
Step 1: Open Object Manager
- Click the gear icon in Salesforce Lightning.
- Select Setup.
- Open Object Manager.
- Search for and select Contact.
A custom object stores business-specific data that does not fit Salesforce’s standard objects. In this example, Contact is a standard object, but the same steps work for a custom object.
Step 2: Create a Formula Field
- Click Fields & Relationships.
- Click New.
- Select Formula.
- Click Next.

A formula field calculates and displays a value from a formula. Users cannot type directly into it.
Step 3: Set the Formula Output
Enter these values:
- Field Label: Days Since Activation
- Field Name: Days_Since_Activation
- Formula Return Type: Number
- Decimal Places: 0
Click Next.

Step 4: Add the TODAY Formula
Enter this formula:
IF(
ISBLANK(Activation_Date__c),
NULL,
TODAY() - Activation_Date__c
)
Click Check Syntax.

This formula first checks whether Activation Date is blank. If it is blank, Salesforce shows no value. If the field contains a date, Salesforce subtracts that date from today and returns the number of days.
For example:
| Activation Date | Current date | Formula result |
|---|---|---|
| September 1, 2026 | September 11, 2026 | 10 |
| September 11, 2026 | September 11, 2026 | 0 |
| September 20, 2026 | September 11, 2026 | -9 |
A negative value means the activation date is in the future. If future activation dates should never exist, add a validation rule to prevent them.
Step 5: Set Field Access and Add It to Layouts
- Click Next after Salesforce validates the formula.
- Choose field visibility for relevant profiles.
- Add the field to the required page layouts.
- Click Save.

A profile controls baseline access for a Salesforce user, including object permissions, field visibility, tabs, and apps. A permission set grants additional permissions without changing a user’s profile.
Check field-level security before assuming users can see a formula field. A perfect formula does not help if the sales team cannot access it.
Salesforce TODAY Function Formula Examples
The Salesforce TODAY function becomes more useful when you combine it with functions such as IF, AND, OR, ISBLANK, and DATEVALUE.
Mark a Case as Overdue
Use this text formula field on the Case object:
IF(
ISBLANK(Due_Date__c),
"No Due Date",
IF(
Due_Date__c < TODAY(),
"Overdue",
IF(
Due_Date__c = TODAY(),
"Due Today",
"Not Due"
)
)
)
This formula helps support managers sort cases by urgency. It avoids a common issue where empty due dates create confusing results.
Calculate Days Until Contract Expiry
Use this Number formula field on a custom Contract or Subscription object:
End_Date__c - TODAY()
The result tells users how many days remain before the contract ends.
To make the output easier for account managers, use a Text formula field instead:
IF(
ISBLANK(End_Date__c),
"No End Date",
IF(
End_Date__c < TODAY(),
"Expired",
TEXT(End_Date__c - TODAY()) & " days remaining"
)
)
This formula returns Expired if the contract end date has passed. Otherwise, it displays the number of days remaining.
Identify Records Created Today
The standard CreatedDate field is a Date/Time field. Convert it with DATEVALUE before comparing it with TODAY().
DATEVALUE(CreatedDate) = TODAY()
Use this formula in a checkbox formula field to identify Leads, Contacts, Cases, or Opportunities created today.
Flag Opportunities With No Recent Activity
Suppose a sales manager wants to review opportunities where the rep has not logged activity for 14 days.
Create a checkbox formula field:
TODAY() - Last_Activity_Date__c > 14
A better version also handles blank activity dates:
OR(
ISBLANK(Last_Activity_Date__c),
TODAY() - Last_Activity_Date__c > 14
)
This formula returns true when no activity exists, or the most recent activity happened more than 14 days ago.
Prevent Future Service Dates
Use this validation rule on a custom Service Request object:
Service_Date__c > TODAY()
Use an error message such as:
Service Date cannot be later than today.
This works well for completed service work, inspections, delivery confirmations, and customer visit records.
TODAY() Versus NOW() Function in Salesforce
The main difference between TODAY() and NOW() is the type of value each function returns.
| Function | Returns | Best use |
|---|---|---|
| TODAY() | Date only | Due dates, expiration dates, days since an event |
| NOW() | Date and time | Time-sensitive SLAs, elapsed hours, exact event timing |
For example, use TODAY() when a task is due by a calendar day:
Due_Date__c < TODAY()
Use NOW() when a Service Cloud team must respond within four hours:
NOW() > Response_Deadline__c
Do not compare a Date field directly with NOW() unless you intentionally convert the values. Mixing Date and Date/Time values causes formula errors or unexpected results.
Things to Keep in Mind
- Use Date values correctly: TODAY() returns a Date value. Convert Date/Time fields with DATEVALUE() before comparing them with TODAY().
- Handle blank dates: Use ISBLANK() before performing date calculations. Blank fields can produce misleading results or make a formula harder to understand.
- Expect live results: Formula fields using TODAY() update when Salesforce evaluates them. Salesforce does not write the changing result back into the record automatically.
- Review time zones: TODAY() depends on Salesforce date and time context. Test formulas with users in different time zones when teams work across regions.
- Choose Flow for record updates: Use a formula field for live display values. Use a record-triggered Flow or scheduled automation when you need Salesforce to update a stored field, create tasks, send alerts, or change ownership.
- Keep validation rules focused: A validation rule should stop a clear data-quality problem. Avoid combining many unrelated date checks in one rule because users will struggle to understand the error message.
Frequently Asked Questions
What does TODAY() do in Salesforce?
The Salesforce TODAY function returns the current calendar date. It does not include time, and it updates whenever Salesforce evaluates the formula or condition.
Can I use TODAY() in a Salesforce formula field?
Yes. You can use TODAY() in formula fields to calculate days since a date, days until an expiry date, or a live status such as Overdue or Due Today.
Can I use TODAY() in a Salesforce validation rule?
Yes. Use TODAY() in a Validation Rule when you need to block invalid date entries. For example, Start_Date__c > TODAY() can prevent users from saving a future start date.
What is the difference between TODAY() and NOW() in Salesforce?
TODAY() returns only the current date. NOW() returns the current date and time. Use TODAY() for calendar-date logic and NOW() for time-sensitive SLA or hourly calculations.
Why does my Salesforce TODAY formula show a negative number?
A negative number usually means the date field contains a future date. For example, TODAY() – Start_Date__c returns a negative value when Start Date is after today.
Does TODAY() update Salesforce records automatically?
No. TODAY() updates the displayed result in a formula field when Salesforce evaluates it, but it does not update a stored field. Use Flow or another automation process when you need to save a changed value or trigger an action.
Conclusion
The Salesforce TODAY function gives you a simple way to build live date logic in formula fields, Validation Rules, reports, and Flow decisions. Start with one clear use case, handle blank values and Date/Time conversions carefully, then test your logic with realistic records.
You may also like:
- Salesforce DATE() Function: Syntax, Examples, and Uses
- Salesforce DATEVALUE Function: Syntax, Examples, and Uses
- Salesforce VALUE() Function: A Practical Guide
- INITCAP() Function in Salesforce [Initial Upper Case Formula]
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.