This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
dev:sql:functions:compare_dates [2010/04/08 20:19] els |
dev:sql:functions:compare_dates [2010/04/08 20:35] els |
||
---|---|---|---|
Line 23: | Line 23: | ||
A string containing a unit abbreviation identifying the type of interval. The supported abbreviations are the same as those found in the EXTRACT function. | A string containing a unit abbreviation identifying the type of interval. The supported abbreviations are the same as those found in the EXTRACT function. | ||
- | ^ Unit ^ Description ^ | + | Valid date_unit options: |
+ | ^ Date_unit ^ Description ^ | ||
| YEAR | Year | | | YEAR | Year | | ||
| MONTH | Month | | | MONTH | Month | | ||
Line 69: | Line 70: | ||
===== Example ===== | ===== Example ===== | ||
==== Example 1 ==== | ==== Example 1 ==== | ||
+ | |||
+ | <code> | ||
+ | > select $compare_date('20090101', current_date, 'DD') from $omnidex | ||
+ | |||
+ | $COMPARE_DA | ||
+ | ----------- | ||
+ | 462 | ||
+ | </code> | ||
+ | |||
{{page>:bottom_add&nofooter&noeditbtn}} | {{page>:bottom_add&nofooter&noeditbtn}} |