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:
", "arguments": [ {"arg":"datetime1","description":"a string, date or datetime representing the later date"}, {"arg":"datetime2","description":"a string, date or datetime representing the earlier date"}], - "examples": [ { "expression":"age('2012-05-12','2012-05-2')", "returns":"interval", "note":"use 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.
ExpressionOutput
dthe day as number without a leading zero (1 to 31)
ddthe day as number with a leading zero (01 to 31)
dddthe abbreviated localized day name (e.g. 'Mon' to 'Sun')
ddddthe long localized day name (e.g. 'Monday' to 'Sunday')
Mthe month as number without a leading zero (1-12)
MMthe month as number with a leading zero (01-12)
MMMthe abbreviated localized month name (e.g. 'Jan' to 'Dec')
MMMMthe long localized month name (e.g. 'January' to 'December')
yythe year as two digit number (00-99)
yyyythe year as four digit number

These expressions may be used for the time part of the format string:

ExpressionOutput
hthe hour without a leading zero (0 to 23 or 1 to 12 if AM/PM display)
hhthe hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)
Hthe hour without a leading zero (0 to 23, even with AM/PM display)
HHthe hour with a leading zero (00 to 23, even with AM/PM display)
mthe minute without a leading zero (0 to 59)
mmthe minute with a leading zero (00 to 59)
sthe second without a leading zero (0 to 59)
ssthe second with a leading zero (00 to 59)
zthe milliseconds without leading zeroes (0 to 999)
zzzthe milliseconds with leading zeroes (000 to 999)
AP or Ainterpret as an AM/PM time. AP must be either \"AM\" or \"PM\".
ap or aInterpret as an AM/PM time. ap must be either \"am\" or \"pm\".
"} diff --git a/resources/function_help/json/hour b/resources/function_help/json/hour index b41ec9fba9e..b1d980ea8cd 100644 --- a/resources/function_help/json/hour +++ b/resources/function_help/json/hour @@ -1,15 +1,15 @@ { "name": "hour", "type": "function", - "description": "Extract the hour part from a datetime or time, or the number of hours from an interval.", + "description": "Extracts the hour part from a datetime or time, or the number of hours from an interval.", "variants": [ { "variant": "Time variant", - "variant_description": "Extract the hour part from a time or datetime.", + "variant_description": "Extracts the hour part from a time or datetime.", "arguments": [ {"arg":"datetime","description":"a time or datetime value"}], "examples": [ { "expression":"hour('2012-07-22T13:24:57')", "returns":"13"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in hours of an interval.", + "variant_description": "Calculates the length in hours of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of hours from"}], "examples": [ { "expression":"hour(tointerval('3 hours'))", "returns":"3"}, { "expression":"hour(age('2012-07-22T13:00:00','2012-07-22T10:00:00'))", "returns":"3"}, diff --git a/resources/function_help/json/minute b/resources/function_help/json/minute index 940bddc5732..1b7847d539a 100644 --- a/resources/function_help/json/minute +++ b/resources/function_help/json/minute @@ -1,15 +1,15 @@ { "name": "minute", "type": "function", - "description": "Extract the minutes part from a datetime or time, or the number of minutes from an interval.", + "description": "Extracts the minutes part from a datetime or time, or the number of minutes from an interval.", "variants": [ { "variant": "Time variant", - "variant_description": "Extract the minutes part from a time or datetime.", + "variant_description": "Extracts the minutes part from a time or datetime.", "arguments": [ {"arg":"datetime","description":"a time or datetime value"}], "examples": [ { "expression":"minute('2012-07-22T13:24:57')", "returns":"24"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in minutes of an interval.", + "variant_description": "Calculates the length in minutes of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of minutes from"}], "examples": [ { "expression":"minute(tointerval('3 minutes'))", "returns":"3"}, { "expression":"minute(age('2012-07-22T00:20:00','2012-07-22T00:00:00'))", "returns":"20"}, diff --git a/resources/function_help/json/month b/resources/function_help/json/month index 8ae919886ab..3baf751c3a2 100644 --- a/resources/function_help/json/month +++ b/resources/function_help/json/month @@ -1,15 +1,15 @@ { "name": "month", "type": "function", - "description": "Extract the month part from a date, or the number of months from an interval.", + "description": "Extracts the month part from a date, or the number of months from an interval.", "variants": [ { "variant": "Date variant", - "variant_description": "Extract the month part from a date or datetime.", + "variant_description": "Extracts the month part from a date or datetime.", "arguments": [ {"arg":"date","description":"a date or datetime value"}], "examples": [ { "expression":"month('2012-05-12')", "returns":"05"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in months of an interval.", + "variant_description": "Calculates the length in months of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of months from"}], "examples": [ { "expression":"month(to_interval('3 months'))", "returns":"3"}, { "expression":"month(age('2012-01-01','2010-01-01'))", "returns":"4.03333"}] diff --git a/resources/function_help/json/second b/resources/function_help/json/second index aebc465928a..6e86be15372 100644 --- a/resources/function_help/json/second +++ b/resources/function_help/json/second @@ -1,15 +1,15 @@ { "name": "second", "type": "function", - "description": "Extract the seconds part from a datetime or time, or the number of seconds from an interval.", + "description": "Extracts the seconds part from a datetime or time, or the number of seconds from an interval.", "variants": [ { "variant": "Time variant", - "variant_description": "Extract the seconds part from a time or datetime.", + "variant_description": "Extracts the seconds part from a time or datetime.", "arguments": [ {"arg":"datetime","description":"a time or datetime value"}], "examples": [ { "expression":"second('2012-07-22T13:24:57')", "returns":"57"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in seconds of an interval.", + "variant_description": "Calculates the length in seconds of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of seconds from"}], "examples": [ { "expression":"second(age('2012-07-22T00:20:00','2012-07-22T00:00:00'))", "returns":"1200"}, { "expression":"second(age('2012-01-01','2010-01-01'))", "returns":"63072000"}] diff --git a/resources/function_help/json/to_date b/resources/function_help/json/to_date index 7e60136e7c2..7f0177df9ba 100644 --- a/resources/function_help/json/to_date +++ b/resources/function_help/json/to_date @@ -1,12 +1,12 @@ { "name": "to_date", "type": "function", - "description": "Convert a string into a date object. An optional format string can be provided to parse the string; see QDate::fromString for additional documentation on the format.", - "arguments": [ + "description": "Converts a string into a date object. An optional format string can be provided to parse the string; see QDate::fromString for additional documentation on the format.", + "arguments": [ {"arg":"string","description":"string representing a date value"}, {"arg":"format","optional":true,"description":"format used to convert the string into a date"} ], - "examples": [ + "examples": [ { "expression":"to_date('2012-05-04')", "returns":"2012-05-04"}, { "expression":"to_date('June 29, 2019','MMMM d, yyyy')", "returns":"2019-06-29"} ] diff --git a/resources/function_help/json/to_datetime b/resources/function_help/json/to_datetime index 01a0314c29e..27f7573b8e6 100644 --- a/resources/function_help/json/to_datetime +++ b/resources/function_help/json/to_datetime @@ -1,12 +1,12 @@ { "name": "to_datetime", "type": "function", - "description": "Convert a string into a datetime object. An optional format string can be provided to parse the string; see QDateTime::fromString for additional documentation on the format.", - "arguments": [ + "description": "Converts a string into a datetime object. An optional format string can be provided to parse the string; see QDateTime::fromString for additional documentation on the format.", + "arguments": [ {"arg":"string","description":"string representing a datetime value"}, {"arg":"format","optional":true,"description":"format used to convert the string into a date"} ], - "examples": [ + "examples": [ { "expression":"to_datetime('2012-05-04 12:50:00')", "returns":"2012-05-04T12:50:00"}, { "expression":"to_datetime('June 29, 2019 @ 12:34','MMMM d, yyyy @ HH:mm')", "returns":"2019-06-29T12:34"} ] diff --git a/resources/function_help/json/to_interval b/resources/function_help/json/to_interval index c793f76305b..4999a613921 100644 --- a/resources/function_help/json/to_interval +++ b/resources/function_help/json/to_interval @@ -1,7 +1,7 @@ { "name": "to_interval", "type": "function", - "description": "Converts a string to a interval type. Can be used to take days, hours, month, etc of a date.", + "description": "Converts a string to a interval type. Can be used to take days, hours, month, etc of a date.", "arguments": [ {"arg":"string","description":"a string representing an interval. Allowable formats include {n} days {n} hours {n} months."}], "examples": [ { "expression":"to_datetime('2012-05-05 12:00:00') - to_interval('1 day 2 hours')", "returns":"2012-05-04T10:00:00"} ] diff --git a/resources/function_help/json/to_time b/resources/function_help/json/to_time index ea1fa120c19..3c65088ab89 100644 --- a/resources/function_help/json/to_time +++ b/resources/function_help/json/to_time @@ -1,12 +1,12 @@ { "name": "to_time", "type": "function", - "description": "Convert a string into a time object. An optional format string can be provided to parse the string; see QTime::fromString for additional documentation on the format.", - "arguments": [ + "description": "Converts a string into a time object. An optional format string can be provided to parse the string; see QTime::fromString for additional documentation on the format.", + "arguments": [ {"arg":"string","description":"string representing a time value"}, {"arg":"format","optional":true,"description":"format used to convert the string into a date"} ], - "examples": [ + "examples": [ { "expression":"to_time('12:30:01')", "returns":"12:30:01"}, { "expression":"to_time('12:34','HH:mm')", "returns":"12:34:00"} ] diff --git a/resources/function_help/json/week b/resources/function_help/json/week index 49d52737028..9b2a23318f3 100644 --- a/resources/function_help/json/week +++ b/resources/function_help/json/week @@ -1,17 +1,17 @@ { "name": "week", "type": "function", - "description": "Extract the week number from a date, or the number of weeks from an interval.", + "description": "Extracts the week number from a date, or the number of weeks from an interval.", "variants": [ { "variant": "Date variant", - "variant_description": "Extract the week number from a date or datetime.", + "variant_description": "Extracts the week number from a date or datetime.", "arguments": [ {"arg":"date","description":"a date or datetime value"}], "examples": [ { "expression":"week('2012-05-12')", "returns":"19"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in weeks of an interval.", + "variant_description": "Calculates the length in weeks of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of months from"}], - "examples": [ { "expression":"week(tointerval('3 weeks'))", "returns":"3"}, + "examples": [ { "expression":"week(to_interval('3 weeks'))", "returns":"3"}, { "expression":"week(age('2012-01-01','2010-01-01'))", "returns":"104.285"}] }] } diff --git a/resources/function_help/json/year b/resources/function_help/json/year index c81f00761d8..68433a5a4b3 100644 --- a/resources/function_help/json/year +++ b/resources/function_help/json/year @@ -1,15 +1,15 @@ { "name": "year", "type": "function", - "description": "Extract the year part from a date, or the number of years from an interval.", + "description": "Extracts the year part from a date, or the number of years from an interval.", "variants": [ { "variant": "Date variant", - "variant_description": "Extract the year part from a date or datetime.", + "variant_description": "Extracts the year part from a date or datetime.", "arguments": [ {"arg":"date","description":"a date or datetime value"}], "examples": [ { "expression":"year('2012-05-12')", "returns":"2012"}] }, { "variant": "Interval variant", - "variant_description": "Calculate the length in years of an interval.", + "variant_description": "Calculates the length in years of an interval.", "arguments": [ {"arg":"interval","description":"interval value to return number of years from"}], "examples": [ { "expression":"year(to_interval('3 years'))", "returns":"3"}, { "expression":"year(age('2012-01-01','2010-01-01'))", "returns":"1.9986"}]