Time column

Write values into a time column.

String format

time

time string format:

`<HH>:<MM>:<SS>[.<fff>]`

where

  • HH: two-digit hour using a 24 hour clock.

  • MM: two-digit minute.

  • SS: two-digit seconds.

  • (Optional) .fff: up to three-digit subseconds; when excluded it’s set to zero (0). For example, one o’clock in the afternoon:

13:00:00.000
13:00:00
  • To insert data into a time column:

INSERT INTO cycling.cyclist_races (
  id,
  races
) VALUES (
   5b6962dd-3f90-4c93-8f61-eabfa4a803e2,
   [ { race_time : '07:00:00'},
     { race_time : '08:00:00' } ]
);
UPDATE cycling.cyclist_races SET races[1] = { race_time : '06:00:00'}
  WHERE id = 5b6962dd-3f90-4c93-8f61-eabfa4a803e2 ;

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com