Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
dev:sql:functions:extract [2010/07/27 15:40]
els
dev:sql:functions:extract [2016/06/28 22:38] (current)
Line 8: Line 8:
 ===== Syntax ===== ===== Syntax =====
  
-  EXTRACT(date_tokens FROM date_column)+  EXTRACT(date_tokens FROM date_expression)
  
 == date_tokens == == date_tokens ==
Line 17: Line 17:
  
  
-== date_column ​==+== date_expression ​==
  
-Required. ​A column ​that is declared as date_class ​datatype. ​ The date_class datatypes are any of the date or time oriented datatypes found in the list of [[dev:​appendix:​reference:​datatypes|Omnidex datatypes]]. ​+Required. ​Any expression ​that returns ​date-class datatype. Examples of date expressions are columns or functions that return a date-class ​datatype. ​ The date_class datatypes are any of the date or time oriented datatypes found in the list of [[dev:​appendix:​reference:​datatypes|Omnidex datatypes]]. ​
  
  
Line 38: Line 38:
   2004-09-14 ​           9   2004-09-14 ​           9
 </​code>​ </​code>​
- 
 ==== Example 2: EXTRACT with format string ==== ==== Example 2: EXTRACT with format string ====
  
 <​code>​ <​code>​
-> select birthdate, extract ('MMM D, YYYY' from birthdate) bday from individuals +> select birthdate, extract ('MMM D, YYYY' from birthdate) bday from individuals;​
-;+
  
 BIRTHDATE ​    BDAY BIRTHDATE ​    BDAY
Line 59: Line 57:
  
 See also: See also:
-{{page>​dev:​sql:​functions:​see_also_date&​noheader&​nofooter&​noeditbtn}}+{{page>​dev:​sql:​functions:​see_also_dates&​noheader&​nofooter&​noeditbtn}}
  
  
 {{page>:​bottom_add&​nofooter&​noeditbtn}} {{page>:​bottom_add&​nofooter&​noeditbtn}}
- 
- 
 
Back to top
dev/sql/functions/extract.1280245256.txt.gz · Last modified: 2016/06/28 22:38 (external edit)