[ 
https://issues.apache.org/jira/browse/CASSANDRA-12360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15408482#comment-15408482
 ] 

Jeremy Hanna commented on CASSANDRA-12360:
------------------------------------------

Sure enough, if I take off the time component, the negative date appears to 
work.  However when selecting the data (with the previous table definition), it 
appears to have some anomalous behavior on formatting:

{code}
cqlsh:jeremy> INSERT INTO testdate (d) VALUES ('-0407-12-27');
cqlsh:jeremy> INSERT INTO testdate (d) VALUES ('1988-12-27');
cqlsh:jeremy> select * from testdate ;

 d
------------
    -867821
 1988-12-27

(2 rows)
{code}

This is likely a separate issue.

[~bryncooke][~dkuppitz] is the date itself sufficient or do you need the full 
datetime?

> Unable to parse negative dates
> ------------------------------
>
>                 Key: CASSANDRA-12360
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12360
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Bryn Cooke
>
> {code}
> cqlsh:date_test> DESC test;
> CREATE TABLE date_test.test (
>     date timestamp PRIMARY KEY
> ) ...
> cqlsh:date_test> INSERT INTO test (date) VALUES ('-0407-12-27T00:00:00Z');
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Unable 
> to coerce '-0407-12-27T00:00:00Z' to a formatted date (long)"
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to