Cassandra cqlsh - how to show microseconds/milliseconds for timestamp columns?

前端 未结 5 1667
名媛妹妹
名媛妹妹 2020-12-02 17:28

I\'m inserting into a Cassandra table with timestamp columns. The data I have comes with microsecond precision, so the time data string looks like this:

2015

5条回答
  •  独厮守ぢ
    2020-12-02 18:16

    It is impossible to show microseconds (1 millionth of a second) using the Cassandra datatype 'timestamp' because the greatest precision available for that datatype is milliseconds (1 thousandth of a second).

    http://docs.datastax.com/en/cql/3.1/cql/cql_reference/timestamp_type_r.html

    Values for the timestamp type are encoded as 64-bit signed integers representing a number of milliseconds since the standard base time known as the epoch

提交回复
热议问题