Skip to main content

Date/time functions

formatDateTime

Commentary

added in 0.0.17

Generates datetime's for time specified in milliseconds, in the default pattern of yyyy-MM-dd'T'HH:mm:ss.SSSZZ.

Optionally, supply the format with format, which must be a valid JodaTime pattern.


Examples

Default formatting

{
"_gen": "formatDateTime",
"ms": {
"_gen": "now"
},
"format": "yyyy-MM-dd'T'HH:mm:ss"
}
[
"2024-04-25T13:28:47"
]

Specification

JSON schema

{
"type": "object",
"properties": {
"ms": {
"oneOf": [
{
"type": "number"
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
},
"format": {
"type": "string"
}
},
"required": [
"ms"
]
}