Skip to main content

Date Variable

The date variable type injects the current date or time into your expansion with configurable formatting.

Basic Usage

- trigger: ":today"
replace: "{{today}}"
vars:
- name: today
type: date
params:
format: "%Y-%m-%d"

Format Specifiers

Format follows strftime conventions:

SpecifierOutputDescription
%Y2026Year (4 digits)
%y26Year (2 digits)
%m06Month (zero-padded)
%d14Day (zero-padded)
%H14Hour (24-hour)
%I02Hour (12-hour)
%M30Minute
%S45Second
%pPMAM/PM
%BJuneFull month name
%bJunAbbreviated month name
%ASundayFull weekday name
%aSunAbbreviated weekday name
%j165Day of year
%W24Week number

Common Format Examples

# ISO date
params:
format: "%Y-%m-%d"
# Output: 2026-06-14

# Human-readable date
params:
format: "%B %d, %Y"
# Output: June 14, 2026

# Time only
params:
format: "%H:%M"
# Output: 14:30

# Full timestamp
params:
format: "%Y-%m-%d %H:%M:%S"
# Output: 2026-06-14 14:30:45

Date with Offset

Add an offset parameter (in seconds) to shift the date:

# Yesterday
- name: yesterday
type: date
params:
format: "%Y-%m-%d"
offset: -86400

# Tomorrow
- name: tomorrow
type: date
params:
format: "%Y-%m-%d"
offset: 86400

# Next hour
- name: next_hour
type: date
params:
format: "%H:%M"
offset: 3600

# One week from now
- name: next_week
type: date
params:
format: "%B %d"
offset: 604800

Complete Example

- trigger: ":meeting"
replace: |
Meeting scheduled: {{date}}
Tomorrow is: {{tomorrow}}
vars:
- name: date
type: date
params:
format: "%A, %B %d at %H:%M"
- name: tomorrow
type: date
params:
format: "%A, %B %d"
offset: 86400

What's Next

Learn about the Clipboard Variable for accessing system clipboard content.