Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[FEATURE][expressions] Add make_date, make_time and make_datetime fun…
…ctions 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.
- Loading branch information
1 parent
7a172b5
commit c2715d7
Showing
5 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "make_date", | ||
"type": "function", | ||
"description": "Creates a date value from year, month and day 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"} | ||
], | ||
"examples": [ | ||
{ "expression":"make_date(2020,5,4)", "returns":"date value 2020-05-04"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"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"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"name": "make_time", | ||
"type": "function", | ||
"description": "Creates a time value from hour, minute and second numbers.", | ||
"arguments": [ | ||
{"arg":"hour", "description":"Hour number"}, | ||
{"arg":"minute", "description":"Minutes"}, | ||
{"arg":"second", "description":"Seconds (fractional values include milliseconds)"} | ||
], | ||
"examples": [ | ||
{ "expression":"make_time(13,45,30.5)", "returns":"time value 13:45:30.500"} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters