节点 / builtin / datatransformation / datetime
Add To A Date
Add a number of days to a date
此内容尚不支持你的语言。
Move a date forward by a number of years, months, days, hours or other units.
What it does
Section titled “What it does”Add To A Date takes Date to add to, adds Duration of the chosen Time unit to add, and writes the new date into a field named by Output field name.
- Units: year, quarter (3 months), month, week (7 days), day, hour, minute, second.
- The calculation uses your computer’s local time zone, so adding 1 day keeps the same clock time even across a daylight-saving change.
- A negative Duration moves the date back, but Subtract From A Date reads more clearly.
- Adding a month to the 31st rolls over when the next month is shorter: January 31 plus 1 month gives March 2 or 3.
When to use it
Section titled “When to use it”- Work out a due date, for example 14 days after an order date.
- Set an expiry time, such as “now plus 1 hour”.
- Build the end of a date range to send to an API.
Inputs and settings
Section titled “Inputs and settings”| 设置项 | 类型 | 作用 |
|---|---|---|
| Date to add to (必填) | Date and time | The date to add days to. |
| Time unit to add (必填) | Choice | The time unit to add to the date. Options: year, quarter, month, week, day, hour, minute, second. |
| Duration (必填) | Number | The duration to add to the date. |
| Output field name (必填) | Text | The name of the output field. |
| Options | Group | The options for the node. |
| Options › Include input fields | Toggle | Whether to include the input fields in the output. 默认值:Off |
Date to add to accepts a date you pick, or an expression such as {{ $input.createdAt }}. ISO dates (2026-03-01, 2026-03-01T09:30:00Z) are the safest format.
Outputs
Section titled “Outputs”-
Output
The item holds one field, named by Output field name, with the new date. Turn on Include input fields to keep the incoming fields next to it, for example { dueDate, orderId, customer }.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”Remind yourself of a follow-up one week from today:
- Get Current Date, Output field name
now. - Add To A Date, Date to add to
{{ $input.now }}, Time unit to addweek, Duration1, Output field namefollowUp. - Format Date, Date to format
{{ $input.followUp }}, FormatDD/MM/YYYY. - Browser Notification showing the formatted date.
Common issues
Section titled “Common issues”- The output is “Invalid Date” or empty. The incoming value is not a date the browser understands. Use an ISO date such as
2026-03-01, or reshape it first. - The result is off by a few hours. The date was read in a different time zone than you expected. Include the time zone in the input (
Zor+02:00). - The new date is missing after the node. With Include input fields on, an incoming field with the same name as Output field name replaces the result. Pick a name the input does not already use.
Related nodes
Section titled “Related nodes”- Subtract From A Date: move a date back.
- Round a Date: snap the result to the start or end of a day, month or year.
- Format Date: turn the result into readable text.
- Get Time Between Dates: compare two dates.