Utilities
Datetime operations, delay, MD5 hash, and random utilities.
9 modules
| Module | Description |
|---|---|
| Add Time | Add time to datetime |
| Format DateTime | Format datetime to string |
| Parse DateTime | Parse string to datetime |
| Subtract Time | Subtract time from datetime |
| Current Date/Time | Get current date and time |
| Delay/Sleep | Pause workflow execution for specified duration |
| MD5 Hash | Calculate MD5 hash of text |
| Random Number | Generate random number in range |
| Random String | Generate random string or UUID |
Modules
Add Time
datetime.add
Add time to datetime
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
datetime | string | No | now | Enter "now" for current time, or ISO 8601 format (e.g., 2024-01-30T14:30:00) |
days | number | No | 0 | Number of days to add (positive) or subtract (negative) |
hours | number | No | 0 | Number of hours to add (positive) or subtract (negative) |
minutes | number | No | 0 | Number of minutes to add (positive) or subtract (negative) |
seconds | number | No | 0 | Number of seconds to add (positive) or subtract (negative) |
Output:
| Field | Type | Description |
|---|---|---|
result | string | The operation result |
timestamp | number | The operation result |
Example: Add 7 days
datetime: now
days: 7Example: Add 2 hours 30 minutes
datetime: 2024-01-15T10:00:00
hours: 2
minutes: 30Format DateTime
datetime.format
Format datetime to string
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
datetime | string | No | now | Enter "now" for current time, or ISO 8601 format (e.g., 2024-01-30T14:30:00) |
format | select (%Y-%m-%d, %Y-%m-%d %H:%M:%S, %Y/%m/%d, %d/%m/%Y, %m/%d/%Y, %Y年%m月%d日, %B %d, %Y, %d %b %Y, %H:%M:%S, %H:%M, %I:%M %p, %Y%m%d, %Y-%m-%dT%H:%M:%SZ, %a, %d %b %Y %H:%M:%S) | No | %Y-%m-%d %H:%M:%S | Select a format or enter custom strftime pattern |
Output:
| Field | Type | Description |
|---|---|---|
result | string | The operation result |
timestamp | number | The operation result |
Example: Format current time
datetime: now
format: %Y-%m-%d %H:%M:%SExample: Custom date format
datetime: 2024-01-15T10:30:00
format: %B %d, %YParse DateTime
datetime.parse
Parse string to datetime
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
datetime_string | string | Yes | - | DateTime string to parse (ISO 8601 format recommended) |
format | select (%Y-%m-%d, %Y-%m-%d %H:%M:%S, %Y/%m/%d, %d/%m/%Y, %m/%d/%Y, %Y年%m月%d日, %B %d, %Y, %d %b %Y, %H:%M:%S, %H:%M, %I:%M %p, %Y%m%d, %Y-%m-%dT%H:%M:%SZ, %a, %d %b %Y %H:%M:%S) | No | %Y-%m-%d %H:%M:%S | Select a format or enter custom strftime pattern |
Output:
| Field | Type | Description |
|---|---|---|
result | string | The operation result |
timestamp | number | The operation result |
year | number | The operation result |
month | number | Unix timestamp |
day | number | Year component |
hour | number | Month component |
minute | number | Day component |
second | number | Hour component |
Example: Parse ISO format
datetime_string: 2024-01-15T10:30:00Example: Parse custom format
datetime_string: January 15, 2024
format: %B %d, %YSubtract Time
datetime.subtract
Subtract time from datetime
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
datetime | string | No | now | Enter "now" for current time, or ISO 8601 format (e.g., 2024-01-30T14:30:00) |
days | number | No | 0 | Number of days to add (positive) or subtract (negative) |
hours | number | No | 0 | Number of hours to add (positive) or subtract (negative) |
minutes | number | No | 0 | Number of minutes to add (positive) or subtract (negative) |
seconds | number | No | 0 | Number of seconds to add (positive) or subtract (negative) |
Output:
| Field | Type | Description |
|---|---|---|
result | string | The operation result |
timestamp | number | The operation result |
Example: Subtract 7 days
datetime: now
days: 7Example: Subtract 1 hour
datetime: 2024-01-15T10:00:00
hours: 1Current Date/Time
utility.datetime.now
Get current date and time
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
format | select (iso, unix, unix_ms, date, time, custom) | No | iso | Output format |
custom_format | string | No | - | Python strftime format (if format=custom) |
timezone | string | No | UTC | Python strftime format (if format=custom) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Timezone (default: UTC) |
datetime | string | Operation status (success/error) |
timestamp | number | Operation status (success/error) |
iso | string | Formatted date/time |
Example: Example
format: isoExample: Example
format: unixDelay/Sleep
utility.delay
Pause workflow execution for specified duration
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
duration_ms | number | No | 1000 | How long to wait in milliseconds |
duration_seconds | number | No | - | Alternative: duration in seconds |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Alternative: duration in seconds |
waited_ms | number | Operation status (success/error) |
Example: Example
duration_seconds: 2Example: Example
duration_ms: 500MD5 Hash
utility.hash.md5
Calculate MD5 hash of text
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
text | text | Yes | - | Text to hash |
encoding | string | No | utf-8 | Text to hash |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Text encoding |
hash | string | Text encoding |
Example: Example
text: Hello WorldRandom Number
utility.random.number
Generate random number in range
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
min | number | No | 0 | Minimum value (inclusive) |
max | number | No | 100 | Minimum value (inclusive) |
decimals | number | No | 0 | Maximum value (inclusive) |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Number of decimal places (0 for integers) |
value | number | Operation status (success/error) |
Example: Example
min: 1
max: 100
decimals: 0Example: Example
min: 0
max: 1
decimals: 2Random String
utility.random.string
Generate random string or UUID
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
length | number | No | 16 | String length |
charset | select (alphanumeric, letters, lowercase, uppercase, numbers, hex, uuid) | No | alphanumeric | String length |
Output:
| Field | Type | Description |
|---|---|---|
status | string | Operation status (success/error) |
value | string | Operation status (success/error) |
Example: Example
length: 16
charset: alphanumericExample: Example
charset: uuid