Skip to content
Permalink
Browse files

Update to_interval function examples

  • Loading branch information
rduivenvoorde authored and nyalldawson committed Oct 5, 2020
1 parent 6420854 commit 163941cad554bf798aea0ed4b23860939b943fd5
Showing with 4 additions and 1 deletion.
  1. +4 −1 resources/function_help/json/to_interval
@@ -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.
You can’t perform that action at this time.