Skip to content

Commit

Permalink
Update to_interval function examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rduivenvoorde authored and nyalldawson committed Oct 5, 2020
1 parent 6420854 commit 163941c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/function_help/json/to_interval
Expand Up @@ -4,6 +4,9 @@
"groups": ["Conversions", "Date and Time"],
"description": "Converts a string to an 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"}
"examples": [
{ "expression":"to_interval('1 day 2 hours')", "returns":"interval: 1.08333 days"},
{ "expression":"to_interval( '0.5 hours' )", "returns":"interval: 30 minutes"},
{ "expression":"to_datetime('2012-05-05 12:00:00') - to_interval('1 day 2 hours')", "returns":"2012-05-04T10:00:00"}
]
}

0 comments on commit 163941c

Please sign in to comment.