mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
19 lines
965 B
Plaintext
19 lines
965 B
Plaintext
{
|
|
"name": "hour",
|
|
"type": "function",
|
|
"description": "Extract 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.",
|
|
"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.",
|
|
"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"},
|
|
{ "expression":"hour(age('2012-01-01','2010-01-01'))", "returns":"17520"}]
|
|
}]
|
|
}
|