diff --git a/resources/function_help/json/age b/resources/function_help/json/age
index fed9896e6a7..0ff76eb2c48 100644
--- a/resources/function_help/json/age
+++ b/resources/function_help/json/age
@@ -4,7 +4,7 @@
"description": "Returns the difference between two dates or datetimes.
The difference is returned as a Interval
and needs to be used with one of the following functions in order to extract useful information:
year
month
week
day
hour
minute
second
day
to extract number of days"},
- { "expression":"day(age('2012-05-12','2012-05-2'))", "returns":"10"} ]
+ "examples": [ { "expression":"day(age('2012-05-12','2012-05-02'))", "returns":"10"},
+ { "expression":"hour(age('2012-05-12','2012-05-02'))", "returns":"240"} ]
}
diff --git a/resources/function_help/json/day b/resources/function_help/json/day
index 67f92bd56f4..a55c0ed9133 100644
--- a/resources/function_help/json/day
+++ b/resources/function_help/json/day
@@ -1,17 +1,18 @@
{
"name": "day",
"type": "function",
- "description": "Extract the day from a date, or the number of days from an interval.",
+ "description": "Extracts the day from a date, or the number of days from an interval.",
"variants": [
{ "variant": "Date variant",
- "variant_description": "Extract the day from a date or datetime.",
+ "variant_description": "Extracts the day from a date or datetime.",
"arguments": [ {"arg":"date","description":"a date or datetime value"}],
"examples": [ { "expression":"day('2012-05-12')", "returns":"12"}] },
{
"variant": "Interval variant",
- "variant_description": "Calculate the length in days of an interval.",
+ "variant_description": "Calculates the length in days of an interval.",
"arguments": [ {"arg":"interval","description":"interval value to return number of days from"}],
- "examples": [ { "expression":"day(tointerval('3 days'))", "returns":"3"},
+ "examples": [ { "expression":"day(to_interval('3 days'))", "returns":"3"},
+ { "expression":"day(to_interval('3 weeks 2 days'))", "returns":"23"},
{ "expression":"day(age('2012-01-01','2010-01-01'))", "returns":"730"}]
}]
}
diff --git a/resources/function_help/json/day_of_week b/resources/function_help/json/day_of_week
index 7380e67788f..4412de4b4c1 100644
--- a/resources/function_help/json/day_of_week
+++ b/resources/function_help/json/day_of_week
@@ -3,6 +3,6 @@
"type": "function",
"description": "Returns the day of the week for a specified date or datetime. The returned value ranges from 0 to 6, where 0 corresponds to a Sunday and 6 to a Saturday.",
"arguments": [ {"arg":"date","description":"date or datetime value"} ],
- "examples": [ { "expression":"day_of_week(todate('2015-09-21'))", "returns":"1"}
+ "examples": [ { "expression":"day_of_week(to_date('2015-09-21'))", "returns":"1"}
]
}
diff --git a/resources/function_help/json/epoch b/resources/function_help/json/epoch
index 7b2b9c584e3..0465a152652 100644
--- a/resources/function_help/json/epoch
+++ b/resources/function_help/json/epoch
@@ -1,7 +1,7 @@
{
"name": "epoch",
"type": "function",
- "description": "Return the interval in milliseconds between the unix epoch and a given date value.",
+ "description": "Returns the interval in milliseconds between the unix epoch and a given date value.",
"arguments": [ {"arg":"date","description":"a date or datetime value"} ],
"examples": [ { "expression":"epoch(to_date('2017-01-01'))", "returns":"1483203600000"} ]
}
diff --git a/resources/function_help/json/format_date b/resources/function_help/json/format_date
index 367909637a1..c694af9fc0b 100644
--- a/resources/function_help/json/format_date
+++ b/resources/function_help/json/format_date
@@ -1,7 +1,7 @@
{
"name": "format_date",
"type": "function",
- "description": "Format a date type or string into a custom string format. Uses Qt date/time format strings. See QDateTime::toString.",
+ "description": "Formats a date type or string into a custom string format. Uses Qt date/time format strings. See QDateTime::toString.",
"arguments": [
{"arg":"datetime","description":"date, time or datetime value"},
{"arg":"format","description":"String template used to format the string. Expression | Output |
---|---|
d | the day as number without a leading zero (1 to 31) |
dd | the day as number with a leading zero (01 to 31) |
ddd | the abbreviated localized day name (e.g. 'Mon' to 'Sun') |
dddd | the long localized day name (e.g. 'Monday' to 'Sunday') |
M | the month as number without a leading zero (1-12) |
MM | the month as number with a leading zero (01-12) |
MMM | the abbreviated localized month name (e.g. 'Jan' to 'Dec') |
MMMM | the long localized month name (e.g. 'January' to 'December') |
yy | the year as two digit number (00-99) |
yyyy | the year as four digit number |
These expressions may be used for the time part of the format string:
Expression | Output |
---|---|
h | the hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display) |
hh | the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display) |
H | the hour without a leading zero (0 to 23, even with AM/PM display) |
HH | the hour with a leading zero (00 to 23, even with AM/PM display) |
m | the minute without a leading zero (0 to 59) |
mm | the minute with a leading zero (00 to 59) |
s | the second without a leading zero (0 to 59) |
ss | the second with a leading zero (00 to 59) |
z | the milliseconds without leading zeroes (0 to 999) |
zzz | the milliseconds with leading zeroes (000 to 999) |
AP or A | interpret as an AM/PM time. AP must be either \"AM\" or \"PM\". |
ap or a | Interpret as an AM/PM time. ap must be either \"am\" or \"pm\". |