I am trying to insert into my CQL table from the command line. I am able to insert everything. But I am wondering if I have a timestamp column, then how can I insert into ti
There are actually 2 different ways for different purposes to insert the current timestamp. From the docs:
Inserting the current timestamp
Use functions to insert the current date into date or timestamp fields as follows:
Current date and time into timestamp field:
toTimestamp(now())sets the timestamp to the current time of the coordinator.Current date (midnight) into timestamp field:
toTimestamp(toDate(now()))sets the timestamp to the current date beginning of day (midnight).