Expression Language
Create calculated attributes, define conditions, and transform data using ProcessMind's expression language.
Functions for formatting values for display. These functions are primarily available in dashboard expressions.
info
Formatting functions are available in frontend expressions (dashboards, displays) but not in server-side calculated attributes.
Display Dates:
formatDate(StartTime, "yyyy-MM-dd") // 2024-03-15
formatDate(StartTime, "MMM d, yyyy") // Mar 15, 2024
formatDate(StartTime, "HH:mm:ss") // 14:30:45
formatDate(StartTime, "EEEE, MMMM d") // Friday, March 15 Format Duration:
formatDuration(3600000) // "1 h"
formatDuration(90000, "s") // "90 s"
formatDuration(86400000, "d") // "1 d" Display Percentages:
formatPercentage(0.75) // "75%"
formatPercentage(0.333) // "33.3%" Uses date-fns format patterns. Common format tokens for formatDate:
Year:
yyyy 4-digit year 2024
yy 2-digit year 24 Month:
MM Month (2 digits) 03
MMM Month (short) Mar
MMMM Month (full) March Day:
dd Day (2 digits) 15
d Day 15
EEEE Day name (full) Friday
EEE Day name (short) Fri Time:
HH Hour (24h) 14
hh Hour (12h) 02
mm Minutes 30
ss Seconds 45
a AM/PM PM Available in frontend expressions only. Uses short unit labels:
ms Milliseconds
s Seconds
m Minutes
h Hours
d Days
mo Months
y Years Formats a timestamp using a date format pattern.
| Parameters |
| ||||||
| Returns | string | ||||||
| Examples | formatDate(StartTime, "yyyy-MM-dd") → 2024-03-18 formatDate(StartTime, "HH:mm") → 14:30 | ||||||
| Notes | Supported tokens are derived consistently for frontend and Athena: yyyy, MM, dd, HH, mm, ss, with M, d, H, m, s and MMM, MMMM, EEE, EEEE also supported for formatting. Formatting uses UTC semantics. |
Formats a duration in milliseconds as a human-readable string.
| Parameters |
| ||||||
| Returns | string | ||||||
| Examples | formatDuration(3600000) → 1 h formatDuration(90000, "s") → 90 s | ||||||
| Notes | Available in frontend expressions only. Uses short unit labels (s, m, h, d, mo, y). |
Formats a decimal value as a percentage.
| Parameters |
| |||
| Returns | string | |||
| Examples | formatPercentage(0.75) → 75% formatPercentage(1.5) → 150% | |||
| Notes | Available in frontend expressions only. |
Formats a number with optional decimal places. Frontend only.
| Parameters |
| ||||||
| Returns | string | ||||||
| Examples | formatNumber(1234.5, 2) → 1,234.50 | ||||||
| Notes | Available in frontend expressions only. |
Formats a number as currency. Frontend only.
| Parameters |
| |||||||||
| Returns | string | |||||||||
| Examples | formatCurrency(99.9, "EUR") → €99.90 | |||||||||
| Notes | Available in frontend expressions only. |
We use cookies to improve your experience, personalize content, and analyze traffic. By clicking "Accept All," you consent to our use of cookies.