This shows you the differences between two versions of the page.
dev:sql:functions:compare_dates [2009/12/19 00:31] tdo created |
dev:sql:functions:compare_dates [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | <html><div align="center"><span style="color:red">DRAFT</span></div></html> | ||
- | ====== Omnidex SQL Function: $COMPARE_DATE ====== | ||
- | {{page>:sql_bar&nofooter&noeditbtn}} | ||
- | ===== Description ===== | ||
- | The $COMPARE_DATES function determines the interval between two dates and returns that value as a fractional floating point value. The interval will default to days unless overridden using the unit parameter. | ||
- | ===== Syntax ===== | ||
- | |||
- | $COMPARE_DATES ( <date_column1 | 'date_string1' > , < date_column2 | 'date_string2 > | ||
- | [, [date_unit] | ||
- | [, options] | ||
- | ) | ||
- | |||
- | ===== Discussion ===== | ||
- | == < date_column1 | 'date_string1' > == | ||
- | An expression resulting in a date-class or string-class datatype | ||
- | |||
- | == < date_column2 | 'date_string2' > == | ||
- | An expression resulting in a date-class or string-class datatype | ||
- | |||
- | == date_unit == | ||
- | A string containing a unit abbreviation identifying the type of interval. The supported abbreviations are the same as those found in the EXTRACT function. | ||
- | |||
- | == options == | ||
- | A string containing options for this functions. No options exist at this time. | ||
- | |||
- | The result of the $COMPARE_DATES function is an INTEGER datatype reflecting the number of units between the two dates. | ||
- | |||
- | |||
- | ===== Example ===== | ||
- | ==== Example 1 ==== | ||
- | {{page>:bottom_add&nofooter&noeditbtn}} |