[
https://issues.apache.org/jira/browse/CASSANDRA-12360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409586#comment-15409586
]
Jeremy Hanna edited comment on CASSANDRA-12360 at 8/5/16 3:34 PM:
------------------------------------------------------------------
So it looks like this ticket is still valid in the case of converting dates
with time components to proper internal Long values. In cqlsh you can do some
time conversions, see
https://cassandra.apache.org/doc/latest/cql/functions.html#time-conversion-functions.
Regarding the formatting, I verified through the Java driver that it was indeed
stored correctly internally. As Josh says, the python library used to format
the date can't do negative dates.
was (Author: jeromatron):
So it looks like this ticket is still valid in the case of converting dates
with time components to proper internal Long values. In cqlsh you can do some
time conversions already, see
https://cassandra.apache.org/doc/latest/cql/functions.html#time-conversion-functions
.
Regarding the formatting, I verified through the Java driver that it was indeed
stored correctly internally. As Josh says, the python library used to format
the date can't do negative dates.
> 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)