Learning Apache Cassandra(Second Edition)
上QQ阅读APP看书,第一时间看更新

Timestamp

Date and time can be stored using the timestamp type, which holds date/time data with millisecond precision. Timestamp literals are enclosed in single quotation marks like string literals, and they take the yyyy-mm-dd HH:mm:ssZ format, for example 2014-05-18 15:49:31-0400. There is no type that stores the date without the time, although the time portion of a timestamp literal can be omitted, which defaults the time to midnight in the given time zone. To represent timestamps with millisecond precision, you may also use an integer literal with the number of milliseconds since midnight UTC on January 1, 1970, for instance 1,400,442,761,830.