Nyall Dawson c2715d7b44 [FEATURE][expressions] Add make_date, make_time and make_datetime functions
These functions allow for direct creation of date/time values. Previously
this was only possible by going through the to_datetime/to_date/to_time
functions, which are string based and accordingly frustrating/inefficient
to use when you have numeric date/time component values.
2020-05-07 14:46:54 +10:00

17 lines
760 B
Plaintext

{
"name": "make_datetime",
"type": "function",
"description": "Creates a datetime value from year, month, day, hour, minute and second numbers.",
"arguments": [
{"arg":"year","description":"Year number. Years 1 to 99 are interpreted as is. Year 0 is invalid."},
{"arg":"month","description":"Month number, where 1=January"},
{"arg":"day", "description":"Day number, beginning with 1 for the first day in the month"},
{"arg":"hour", "description":"Hour number"},
{"arg":"minute", "description":"Minutes"},
{"arg":"second", "description":"Seconds (fractional values include milliseconds)"}
],
"examples": [
{ "expression":"make_datetime(2020,5,4,13,45,30.5)", "returns":"datetime value 2020-05-04 13:45:30.500"}
]
}