Transform Reference
Date & Time Verbs
Date formatting, parsing, arithmetic (add days/months/years), and date difference calculations.
| Verb | Syntax | Description | Try It |
|---|---|---|---|
| formatDate | %formatDate @path "pattern" | Format date string | Try |
| formatTimestamp | %formatTimestamp @path "pattern" | Format timestamp | Try |
| parseDate | %parseDate @path "pattern" | Parse date from string | Try |
| addDays | %addDays @path days | Add N days | Try |
| addMonths | %addMonths @path months | Add N months | Try |
| addYears | %addYears @path years | Add N years | Try |
| dateDiff | %dateDiff @p1 @p2 "unit" | Difference in units | Try |
| today | %today | Current date | Try |
| now | %now | Current timestamp | Try |
| dayOfWeek | %dayOfWeek @path | Day of week (0-6) | Try |
| businessDays | %businessDays @date ##count | Add N business days (skip weekends) | Try |
| nextBusinessDay | %nextBusinessDay @date | Next weekday (Mon-Fri); same day if already weekday | Try |
| formatDuration | %formatDuration @duration | ISO 8601 duration to human-readable ("2 hours, 30 minutes") | Try |
Reference
Date Format Patterns
| Pattern | Description | Example |
|---|---|---|
YYYY | 4-digit year | 2024 |
MM | 2-digit month | 06 |
DD | 2-digit day | 15 |
HH | 2-digit hour (24h) | 14 |
mm | 2-digit minute | 30 |
ss | 2-digit second | 45 |
Business Days (businessDays / nextBusinessDay)
Business day calculations skip weekends only (Saturday and Sunday). No holiday calendar is applied.
%businessDays @date ##5— adds 5 business days, skipping weekends. Negative values subtract.%nextBusinessDay @date— returns the same date if it's Mon–Fri, otherwise advances to the next Monday.
Duration Formatting (formatDuration) — ISO 8601
Converts an ISO 8601 duration string to human-readable text.
| Component | Meaning | Example Input | Output |
|---|---|---|---|
P | Period prefix (required) | P1Y | 1 year |
Y | Years | P2Y | 2 years |
M (date) | Months | P3M | 3 months |
D | Days | P10D | 10 days |
T | Time separator | PT2H30M | 2 hours, 30 minutes |
H | Hours | PT4H | 4 hours |
M (time) | Minutes | PT45M | 45 minutes |
S | Seconds | PT30S | 30 seconds |
Example: %formatDuration "P1Y2M3DT4H5M6S" → "1 year, 2 months, 3 days, 4 hours, 5 minutes, 6 seconds"
Components with value 0 are omitted. Singular/plural forms are applied automatically.
Examples
Date verb examples
; Formatting
eff_us = %formatDate @effective "MMDDYYYY" ; 2024-06-15 -> "06152024"
eff_iso = %formatDate @effective "YYYY-MM-DD" ; -> "2024-06-15"
; Parsing
parsed = %parseDate @date_string "MMDDYYYY" ; "06152024" -> date
; Arithmetic
expiration = %addMonths @effective ##6 ; 2024-06-15 -> 2024-12-15
days_remaining = %dateDiff @today @expiration "days" ; -> 183
; Current
process_date = %formatDate %today "YYYYMMDD"