How to automate date inputs with the Data and time step
Getting a date and using this within your automation can be helpful when form filling, or when keeping track of when your automation has run.
# Getting a date and time
The Date and time step can be used to get a date. This has various options to get a timestamp, such as:
- Current - the current date and time.
- Custom - various options for the date to return a date relative to the current date, such as in the past or future.
- Reformat existing - reformat a date and time passed into the step, useful when using a date from a Google Sheet.
The "Date and time" step generates a timestamp for the exact moment the step is executed in the automation. This timestamp reflects when the "Date and time" step runs, not when it is referenced elsewhere. Typically, this difference is just a few milliseconds, though it may increase for larger automations. If consistency across steps is crucial, run the "Date and time" step immediately before the step using its output.
# Using the timestamp
The "Date and time" step will return a date-and-time data token. This can be used in other steps using the "Insert data" option within steps that have inputs. Some steps that this can be used in:
- Enter text step - to input into forms.
- Write to a Google Sheet step - to write to your Google Sheet, to keep track of when the data was created, for example.
- Download file step - to add the date into your file or folder name.
- Send an email - to add the date into your email body.
For automating a date picker, see the Date picker step.