- Getting started with Airtable
- Introduction to Airtable basics
- Contacting Airtable Support Updated
- Airtable home screen
- Glossary of Airtable terminology
- Airtable technical requirements
- Feature differences between Airtable on desktop and mobile
- Airtable keyboard shortcuts
- Using Markdown in Airtable
- Adding descriptions in Airtable
- Finding Airtable IDs
- Airtable Automations
- Automations Overview
- Automation feature walkthroughs
- Integrated automation walkthroughs
- Airtable automation walkthroughs
- Linking existing records using automations
- Conditional groups of automation actions
- Repeating groups of Airtable automation actions
- Creating recurring records using automations
- How to delay Airtable automation runs
- Prevent automations from triggering by mistake
- Use automations to timestamp status updates
- Automation Triggers
- Airtable Triggers
- Airtable automation trigger: When record matches conditions
- Airtable automation trigger: When a form is submitted
- Airtable automation trigger: When record created
- Airtable automation trigger: When record updated
- Airtable automation trigger: When record enters view
- Airtable automation trigger: At scheduled time
- Airtable automation trigger: When webhook received
- Airtable automation trigger: When a button is clicked
- Airtable automation trigger: When email received Updated
- Integrated Triggers
- Airtable Triggers
- Automation Actions
- Airtable Actions
- Airtable automation action: Send email Updated
- Airtable automation action: Create record
- Airtable automation action: Update record
- Airtable automation action: Find records
- Airtable automation action: Sort list
- Airtable automation action: Run a script Updated
- Airtable automation action: Generate with AI
- Integrated Actions
- Airtable automation actions: Slack
- Airtable automation actions: Google Workspace
- Airtable automation action: Send MS Teams message
- Airtable automation actions: Outlook
- Airtable automation actions: Jira Cloud
- Airtable automation actions: Jira Server / Data Center
- Airtable automation actions: Salesforce
- Airtable automation action: Create post in Facebook Pages
- Airtable automation actions: GitHub Issues
- Airtable automation action: Hootsuite post
- Airtable automation action: Send Twilio SMS
- Airtable Actions
- Airtable Bases
- Using Airtable Cobuilder
- Airtable bases overview
- Creating and managing Airtable bases
- Structuring bases in Airtable
- Moving bases between workspaces in Airtable
- Creating and managing tables in Airtable
- Creating Airtable base share links
- Importing third-party data into Airtable
- Using insights in Airtable
- Troubleshooting Airtable base performance
- Airtable Betas
- Collaborating in Airtable
- Airtable Enterprise Support
- General Enterprise information
- External badging in Airtable
- Using app library and components in Airtable Updated
- Ask an Expert beta overview
- European data residency at Airtable
- Airtable user groups overview
- Airtable Enterprise API
- Creating and managing data retention policies in Airtable
- eDiscovery APIs in Airtable
- Airtable and data loss prevention
- Accessing Enterprise audit logs in Airtable
- Set up Jira Server / Data Center to connect with Airtable
- Admin panel pages
- Airtable admin panel overview
- Users - Airtable enterprise admin panel
- Airtable admin panel user details
- Groups - Airtable admin panel
- Workspaces - Airtable Enterprise Admin Panel
- Bases - Airtable admin panel
- Interfaces - Airtable admin panel
- Data sets - Airtable admin panel
- Managed apps - Airtable admin panel
- Components - Airtable admin panel
- Reports - Airtable admin panel
- Settings - Airtable admin panel Updated
- Managing Enterprise organizations
- Managing Enterprise admins in admin panel
- Using Organizations
- Organization branding for apps in Airtable
- Enterprise Hub in Airtable
- Enterprise Hub: Org unit assignment with user groups Updated
- Deactivating, removing access, and reactivating users in the admin panel
- Managing user access to workspaces and bases
- Airtable Enterprise Key Management Updated
- Custom terms of use New
- Enterprise SSO
- General Enterprise information
- Airtable Extensions
- Airtable Fields
- Fields Overview
- Attachment
- Date-based fields
- Formula
- Getting Started with Formulas
- Formula Foundations
- The essentials of Airtable formulas
- Formula writing tips for beginners
- Troubleshooting formulas
- Basic calculations
- Conditional statements
- Logical arguments
- Working with dates
- Displaying DATETIME_FORMAT using the date field in Airtable
- Working with date functions in Airtable
- Calculating the difference between dates in Airtable
- Supported DATETIME_DIFF unit specifiers in Airtable
- Supported DATETIME_FORMAT format specifiers in Airtable
- Using the DATETIME_PARSE() formula in Airtable
- Working with timezones
- Record functions
- Text functions
- Numeric functions
- Common Solutions: Beginner
- Common Solutions: Intermediate
- Common Solutions: Advanced
- Long Text Field
- Linked Record Field
- Linking records in Airtable
- Limiting linked record selection to a view in Airtable
- Dynamic filtering in linked record fields
- Linking to one, many, or a subset of Airtable records
- Converting existing fields to Airtable linked records
- Reordering record links in Airtable
- Understanding linked record relationships in Airtable
- Number-Based Fields
- Other Fields
- Rollup, lookup, and count fields
- Select and user fields
- Integrating with Airtable
- API
- Getting started with Airtable's Web API
- Creating personal access tokens
- Airtable Webhooks API Overview
- Service accounts overview
- Airtable Web API - Using filterByFormula or sort parameters
- Airtable API Deprecation Guidelines
- Airtable API: Common troubleshooting
- Managing API call limits in Airtable
- URL length limitations for web API requests
- Integration services
- Third-party integrations via OAuth overview
- Troubleshooting disconnected OAuth integrations in Airtable
- Options for integrating with Airtable
- Third-party integrations - Common troubleshooting
- Low-code integrations - Common troubleshooting
- Integrating Airtable with external calendar applications
- Visualizing records from Airtable in Tableau
- Visualizing Airtable records in Microsoft Power BI & Power Query
- Integrating HubSpot with Airtable
- Using Zapier to integrate Airtable with other services
- Using Zapier's Multi-Step Zaps to find and update records
- Using IFTTT to integrate Airtable with other services
- Integrating with AWS Lambda & DynamoDB
- Developer tools
- API
- Airtable Interface Designer
- Interface Designer overview articles
- Interface layouts
- Interface elements
- Adding and removing elements in interfaces
- Adding layouts to interfaces
- Formatting elements in interfaces
- Interface element: Button
- Interface element: Calendar
- Interface element: Chart
- Interface element: Filter
- Interface element: Gallery
- Interface element: Grid
- Interface element: Kanban
- Interface element: Number
- Interface element: Record picker
- Interface element: Text
- Interface element: Timeline
- Learning and Resources
- Managing Airtable
- Airtable Policy
- Airtable Records
- Airtable Sync
- Airtable Views
- Airtable Workspaces
- Print
- Share
- DarkLight
- PDF
Working with date functions in Airtable
- Updated on 16 Sep 2024
- 4 Minutes to read
- Print
- Share
- DarkLight
- PDF
All plan types | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading |
In this article, we’ll take a look at functions that will help you work with dates and times. As you learn about these functions, feel free to try them out to practice in a formula field in one of your tables that contains a date and time field. Please refer to this section of the formula field reference article to understand the specifics about each function covered in the article below.
Date functions can be split up into four primary categories:
Returning specific datetimes
Formatting strings
Adding or subtracting dates
Returning dates
In the following sections, we’ll go over functions that belong in each of those categories. If you’d like to skip to a specific section, just click on its name in the last above.
Returning datetimes in Airtable
These functions return a specified value according to the referenced datetime. For example, if you wanted to return the month of every completion date in a table, you would write: MONTH({Completion date}).
Here are the functions that work in this way:
YEAR()
MONTH()
DAY()
HOUR()
MINUTE()
SECOND()
To practice, enter a few dates into a table, and use a few of these functions to output a different result. Since they all work similarly you don't necessarily need to practice each one - but knowing how the work categorically is key.
Formatting strings in Airtable
The functions below format datetimes into specific strings - either as a time, or as a date.
TIMESTR()
DATESTR()
For example, if you wanted to format the current date and time provided by NOW()
only as the time, you would use this formula:
TIMESTR(NOW ())
Using the dates you listed in the previous section, practice using these two functions to format the dates in different ways.
Returning dates in Airtable
These last date and time functions can be used to return the day or week of the year according to whatever datetime they reference.
WEEKDAY(): return the day of the week
WEEKNUM(): return the week of the year
For example, if you want to organize a table by week of the year, you would use a formula like this:
WEEKNUM ({Date})
Adding or subtracting time from dates
The DATEADD()
function, allows you to add specified "count" units to a datetime. See the list of shared unit specifiers here. For this function we recommend using the full unit specifier, (i.e. use "years" instead of "y"), for your desired unit.
For example, if you wanted to automatically calculate an SLA due date by adding 2 weeks of time to the day a request was created then you might make a formula similar to this:
DATEADD({Created date}, 2, "weeks")
Alternatively, if you wanted to subtract time from a date, say if you were wanting to calculate a 1 week out reminder when a task or project is due, then you would create a formula like this:
DATEADD({Due date}, -1, "weeks")
Notice, that there is a hyphen in front of the number you specify to make the number negative.
Returning workdays in Airtable
This function doesn't quite fit with the other categories, and works similarly the DATEADD()
function covered previously.
You can use WORKDAY() to return the date after a specific number of working days. For example, if you wanted to always calculate a 30 working days after a start date, you would use a formula like this:
WORKDAY({Start Date}, 30)
Working days exclude weekends and an optional list of holidays, formatted as a comma-separated string of ISO-formatted dates (similar to WORKDAY_DIFF()
).
Datetimes practice in Airtable
Want to practice working with datetimes? Setup a base that leverages an IF statement along with this function to output different dates. Follow these steps:
Create a random list of 10 dates in a {Start Date} field
Create a single select field with values of Type 1 and Type 2
For 5 records, assign Type 1
For 5 records, assign Type 2
Next, create a formula to output a different number of working days depending on the type:
For Type 1 records, add 7 days
For Type 2 records, add 14 days
What formula did you come up with? If you’re having trouble, or simply want to check your work, you can click the box below to see a correct formula.
WORKDAY() Formula
`IF({Type}="Type 1", WORKDAY({Start Date}, 7), IF({Type}="Type 2", WORKDAY({Start Date}, 14), {Start Date}))`
FAQs
Can I add a duration field’s value to a date field?
Yes, but you need to follow a particular format in the DATEADD()
formula to get it to output correctly. Duration fields are formatted in seconds. So the unit specifier at the end of the formula should be “seconds"
.
For example, let’s say that you want to add a “Task duration” field’s value to a “Submission date” field so that there is a rough estimate of when the task can be completed by. In this simple example, you could use the following formula:
DATEADD({Submission date}, {Task duration}, "seconds")
Note
Make sure that the “Timezones” match in the
DATEADD()
formula you are creating if the “Formatting” setting to “Use the same time zone for all collaborators” is enabled on the date field (in this case the “Submission date” field) you are adding time to.