2015-05-03 18:40:09 +10:00
|
|
|
<h3>to_interval() function</h3>
|
2013-05-11 13:15:59 +10:00
|
|
|
Converts a string to a interval type. Can be used to take days, hours, month, etc off a date.
|
|
|
|
|
|
|
|
<h4>Syntax</h4>
|
2015-05-03 18:40:09 +10:00
|
|
|
<code>to_interval('string')</code><br>
|
2013-05-11 13:15:59 +10:00
|
|
|
|
|
|
|
<h4>Arguments</h4>
|
|
|
|
<code>string</code> - is string. Format {n} days {n} hours {n} months
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<h4>Example</h4>
|
|
|
|
<!-- Show example of function.-->
|
2015-05-03 18:40:09 +10:00
|
|
|
<code>todatetime('2012-05-05 12:00:00') - to_interval('1 day 2 hours') → 2012-05-04T10:00:00</code><br>
|