[date.format]
date.format is a slot in the date namespace, in Hyperlambda, the language of Magic Cloud. Formats a DateTime using a .NET format string (e.g. yyyy-MM-dd HH:mm) for display or logging.
- Value (
date), required: Date value to format - Returns: Resolves to the formatted date string
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
[format] |
string | yes | Format string. |
Guide: How to use [date.format]
JSON declaration
This is the complete declaration of date.format, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "date.format",
"description": "Formats a DateTime using a .NET format string (e.g. yyyy-MM-dd HH:mm) for display or logging",
"signature": {
"input": {
"kind": "date",
"description": "Date value to format",
"required": true,
"mode": "ValueOrExpression"
},
"children": {
"format": {
"type": "string",
"kind": "date-format",
"description": "Format string",
"required": true,
"mode": "ValueOrExpression",
"cardinality": "ExactlyOne",
"role": "Option",
"projection": "Value"
}
},
"output": {
"mode": "Value",
"kind": "formatted-date,text",
"description": "Resolves to the formatted date string"
}
}
}
all date.* slots |
date.from-unix → |