Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
1.2 KiB
Plaintext
Raw Normal View History

{
"name": "second",
"type": "function",
2020-07-02 01:46:48 +01:00
"groups": ["Date and Time"],
"description": "Extracts the seconds part from a datetime or time, or the number of seconds from an interval.",
2022-01-13 08:56:17 -05:00
"variants": [{
"variant": "Time variant",
"variant_description": "Extracts the seconds part from a time or datetime.",
"arguments": [{
"arg": "datetime",
"description": "a time or datetime value"
}],
"examples": [{
"expression": "second( to_datetime('2012-07-22 13:24:57') )",
"returns": "57"
}]
}, {
"variant": "Interval variant",
"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(to_interval('3 minutes'))",
"returns": "180"
}, {
"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"
}]
}],
"tags": ["extracts", "part", "seconds", "interval", "number", "time", "datetime"]
}