Skip to content

Commit

Permalink
Update user manual
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <daichen@amazon.com>
  • Loading branch information
dai-chen committed Jul 30, 2021
1 parent 5469003 commit c595612
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/user/general/datatypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -338,15 +338,15 @@ Conversion from string to date and time types
A string can also represent and be converted to date and time types (except to interval type). As long as the string value is of valid format required by the target date and time types, the conversion can happen implicitly or explicitly as follows::

os> SELECT
... CAST('2021-06-17 00:00:00' AS TIMESTAMP) = '2021-06-17 00:00:00' as string_to_timestamp,
... '2021-06-18' < CAST('2021-06-17' AS DATE) as string_to_date,
... '10:20:00' <= CAST('11:00:00' AS TIME) as string_to_time;
... TIMESTAMP('2021-06-17 00:00:00') = '2021-06-17 00:00:00',
... '2021-06-18' < DATE('2021-06-17'),
... '10:20:00' <= TIME('11:00:00');
fetched rows / total rows = 1/1
+-----------------------+------------------+------------------+
| string_to_timestamp | string_to_date | string_to_time |
|-----------------------+------------------+------------------|
| True | False | True |
+-----------------------+------------------+------------------+
+------------------------------------------------------------+-------------------------------------+----------------------------------+
| TIMESTAMP('2021-06-17 00:00:00') = '2021-06-17 00:00:00' | '2021-06-18' < DATE('2021-06-17') | '10:20:00' <= TIME('11:00:00') |
|------------------------------------------------------------+-------------------------------------+----------------------------------|
| True | False | True |
+------------------------------------------------------------+-------------------------------------+----------------------------------+

String Data Types
=================
Expand Down

0 comments on commit c595612

Please sign in to comment.