Author: paul
Date: 2007-04-23 21:48:39 +0200 (Mon, 23 Apr 2007)
New Revision: 6079
Log:
r23907@polar: paul | 2007-04-23 14:33:14 -0500
Point out that temporal values can have a trailing microseconds part
(but that it cannot be stored in temporal columns).
Modified:
trunk/refman-4.1/data-types.xml
trunk/refman-5.0/data-types.xml
trunk/refman-5.1/data-types.xml
Property changes on: trunk
___________________________________________________________________
Name: svk:merge
- 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:23901
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:19497
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
+ 4767c598-dc10-0410-bea0-d01b485662eb:/mysqldoc-local/mysqldoc/trunk:23907
7d8d2c4e-af1d-0410-ab9f-b038ce55645b:/mysqldoc-local/mysqldoc:19497
b5ec3a16-e900-0410-9ad2-d183a3acac99:/mysqldoc-local/mysqldoc/trunk:14218
bf112a9c-6c03-0410-a055-ad865cd57414:/mysqldoc-local/mysqldoc/trunk:14593
Modified: trunk/refman-4.1/data-types.xml
===================================================================
--- trunk/refman-4.1/data-types.xml 2007-04-23 19:43:22 UTC (rev 6078)
+++ trunk/refman-4.1/data-types.xml 2007-04-23 19:48:39 UTC (rev 6079)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 0; 2600 bytes
@@ -2815,6 +2815,44 @@
</itemizedlist>
<para>
+ A microseconds part is allowable in temporal values in some
+ contexts, such as in literal values, and in the arguments to or
+ return values from some temporal functions. Microseconds are
+ specified as a trailing <literal>.uuuuuu</literal> part in the
+ value. Example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT MICROSECOND('2010-12-10 14:12:09.019473');</userinput>
++-------------------------------------------+
+| MICROSECOND('2010-12-10 14:12:09.019473') |
++-------------------------------------------+
+| 19473 |
++-------------------------------------------+
+</programlisting>
+
+ <para>
+ However, microseconds cannot be stored into a column of any
+ temporal data type. Any microseconds part is discarded.
+ </para>
+
+ <para>
+ Conversion of <literal>DATETIME</literal> values to numeric form
+ (for example, by adding <literal>+0</literal>) results in a
+ double value with a microseconds part of
+ <literal>.000000</literal>:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT NOW(), NOW()+0;</userinput>
++---------------------+-----------------------+
+| NOW() | NOW()+0 |
++---------------------+-----------------------+
+| 2007-04-23 14:21:52 | 20070423142152.000000 |
++---------------------+-----------------------+
+</programlisting>
+
+ <para>
Illegal <literal>DATETIME</literal>, <literal>DATE</literal>, or
<literal>TIMESTAMP</literal> values are converted to the
<quote>zero</quote> value of the appropriate type
@@ -3815,6 +3853,15 @@
</itemizedlist>
<para>
+ A trailing <literal>.uuuuuu</literal> microseconds part of
+ <literal>TIME</literal> values is allowed under the same
+ conditions as for other temporal values, as described in
+ <xref linkend="datetime"/>. This includes the property that any
+ microseconds part is discarded from values stored into
+ <literal>TIME</literal> columns.
+ </para>
+
+ <para>
For <literal>TIME</literal> values specified as strings that
include a time part delimiter, it is not necessary to specify
two digits for hours, minutes, or seconds values that are less
Modified: trunk/refman-5.0/data-types.xml
===================================================================
--- trunk/refman-5.0/data-types.xml 2007-04-23 19:43:22 UTC (rev 6078)
+++ trunk/refman-5.0/data-types.xml 2007-04-23 19:48:39 UTC (rev 6079)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 0; 2600 bytes
@@ -2936,6 +2936,44 @@
</itemizedlist>
<para>
+ A microseconds part is allowable in temporal values in some
+ contexts, such as in literal values, and in the arguments to or
+ return values from some temporal functions. Microseconds are
+ specified as a trailing <literal>.uuuuuu</literal> part in the
+ value. Example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT MICROSECOND('2010-12-10 14:12:09.019473');</userinput>
++-------------------------------------------+
+| MICROSECOND('2010-12-10 14:12:09.019473') |
++-------------------------------------------+
+| 19473 |
++-------------------------------------------+
+</programlisting>
+
+ <para>
+ However, microseconds cannot be stored into a column of any
+ temporal data type. Any microseconds part is discarded.
+ </para>
+
+ <para>
+ Conversion of <literal>DATETIME</literal> values to numeric form
+ (for example, by adding <literal>+0</literal>) results in a
+ double value with a microseconds part of
+ <literal>.000000</literal>:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT NOW(), NOW()+0;</userinput>
++---------------------+-----------------------+
+| NOW() | NOW()+0 |
++---------------------+-----------------------+
+| 2007-04-23 14:21:52 | 20070423142152.000000 |
++---------------------+-----------------------+
+</programlisting>
+
+ <para>
Illegal <literal>DATETIME</literal>, <literal>DATE</literal>, or
<literal>TIMESTAMP</literal> values are converted to the
<quote>zero</quote> value of the appropriate type
@@ -3591,6 +3629,15 @@
</itemizedlist>
<para>
+ A trailing <literal>.uuuuuu</literal> microseconds part of
+ <literal>TIME</literal> values is allowed under the same
+ conditions as for other temporal values, as described in
+ <xref linkend="datetime"/>. This includes the property that any
+ microseconds part is discarded from values stored into
+ <literal>TIME</literal> columns.
+ </para>
+
+ <para>
For <literal>TIME</literal> values specified as strings that
include a time part delimiter, it is not necessary to specify
two digits for hours, minutes, or seconds values that are less
Modified: trunk/refman-5.1/data-types.xml
===================================================================
--- trunk/refman-5.1/data-types.xml 2007-04-23 19:43:22 UTC (rev 6078)
+++ trunk/refman-5.1/data-types.xml 2007-04-23 19:48:39 UTC (rev 6079)
Changed blocks: 2, Lines Added: 47, Lines Deleted: 0; 2600 bytes
@@ -2809,6 +2809,44 @@
</itemizedlist>
<para>
+ A microseconds part is allowable in temporal values in some
+ contexts, such as in literal values, and in the arguments to or
+ return values from some temporal functions. Microseconds are
+ specified as a trailing <literal>.uuuuuu</literal> part in the
+ value. Example:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT MICROSECOND('2010-12-10 14:12:09.019473');</userinput>
++-------------------------------------------+
+| MICROSECOND('2010-12-10 14:12:09.019473') |
++-------------------------------------------+
+| 19473 |
++-------------------------------------------+
+</programlisting>
+
+ <para>
+ However, microseconds cannot be stored into a column of any
+ temporal data type. Any microseconds part is discarded.
+ </para>
+
+ <para>
+ Conversion of <literal>DATETIME</literal> values to numeric form
+ (for example, by adding <literal>+0</literal>) results in a
+ double value with a microseconds part of
+ <literal>.000000</literal>:
+ </para>
+
+<programlisting>
+mysql> <userinput>SELECT NOW(), NOW()+0;</userinput>
++---------------------+-----------------------+
+| NOW() | NOW()+0 |
++---------------------+-----------------------+
+| 2007-04-23 14:21:52 | 20070423142152.000000 |
++---------------------+-----------------------+
+</programlisting>
+
+ <para>
Illegal <literal>DATETIME</literal>, <literal>DATE</literal>, or
<literal>TIMESTAMP</literal> values are converted to the
<quote>zero</quote> value of the appropriate type
@@ -3452,6 +3490,15 @@
</itemizedlist>
<para>
+ A trailing <literal>.uuuuuu</literal> microseconds part of
+ <literal>TIME</literal> values is allowed under the same
+ conditions as for other temporal values, as described in
+ <xref linkend="datetime"/>. This includes the property that any
+ microseconds part is discarded from values stored into
+ <literal>TIME</literal> columns.
+ </para>
+
+ <para>
For <literal>TIME</literal> values specified as strings that
include a time part delimiter, it is not necessary to specify
two digits for hours, minutes, or seconds values that are less
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r6079 - in trunk: . refman-4.1 refman-5.0 refman-5.1 | paul | 23 Apr |