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:current_date [2009/12/05 00:01]
tdo
dev:sql:functions:current_date [2016/06/28 22:38] (current)
Line 1: Line 1:
 {{page>:​top_add&​nofooter&​noeditbtn}} {{page>:​top_add&​nofooter&​noeditbtn}}
-<​html><​div align="​center"><​span style="​color:​red">​DRAFT</​span></​div></​html>​ 
-====== Omnidex SQL Function: CASE ====== 
 {{page>:​sql_bar&​nofooter&​noeditbtn}} {{page>:​sql_bar&​nofooter&​noeditbtn}}
 +
 +====== Omnidex SQL Function: CURRENT_DATE ======
 ===== Description ===== ===== Description =====
-The CURRENT_TIME ​function returns the current date from the system's time-of-day clock.+The CURRENT_DATE ​function returns the current date from the server's time-of-day clock.  The function is processed once at the beginning of the execution of the SQL statement. ​ A new value is not obtained with each reference or with each fetched row.  In a client-server or Omnidex Grid application,​ the date returned is from the individual server processing the query.
  
-The function ​is processed once at the beginning of execution of the SQL statement. A new value is not obtained with each reference or with each fetched row.+This function ​returns an ANSI DATE datatype.
 ===== Syntax ===== ===== Syntax =====
-CURRENT_TIME+CURRENT_DATE 
 ===== Examples ===== ===== Examples =====
 +==== Example 1: Column ====
 +<​code>​
 +> select current_date from $omnidex;
  
-==== Example ​==== +CURRENT_DATE 
-<code SQL> +------------ 
-select company,  +  2010-07-28 
-current_time + 
-from customers  +</​code>​ 
-where company='​dynamic'​+==== Example ​2: Expression calculating age ====
  
-... 
-Dynamic Information Systems Corporation,​ 14:44:56.00 
 <​code>​ <​code>​
 +> select birthdate, $compare_dates(birthdate,​ current_date,​ '​YY'​) age from individuals;​
 +
 +BIRTHDATE ​    AGE
 +------------ ​ -----------
 +  1938-07-14 ​          72
 +  1957-11-22 ​          53
 +  1960-07-28 ​          50
 +  1929-08-22 ​          81
 +  1933-07-09 ​          77
 +  1944-08-01 ​          66
 +  2004-09-14 ​           6
 +</​code>​
 +
 +====== Additional Resources ======
 +
 +See also:
 +{{page>​dev:​sql:​functions:​see_also_variables&​nofooter&​noeditbtn&​noheader}}
 +
 {{page>:​bottom_add&​nofooter&​noeditbtn}} {{page>:​bottom_add&​nofooter&​noeditbtn}}
 +
 +
 
Back to top
dev/sql/functions/current_date.1259971286.txt.gz · Last modified: 2016/06/28 22:38 (external edit)