1

I have one record stored in cassandra database like ("MM/dd/yyyy HH:mm:ss") for timestamp datatype. so, now i need to fetch data based on MM(specific month).

ex:- ("06/04/2019 10:14:65")

Here i will pass 06 and need to fetch data based on on 06 month.

I am using spring boot.

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
muzaffer
  • 11
  • 3
  • Possible duplicate of [cassandra get all records in time range](https://stackoverflow.com/questions/18697725/cassandra-get-all-records-in-time-range) – palvarez Jun 04 '19 at 17:10
  • I am not sure how else this table is used, but if this is its only purpose, I would redesign the table to include the month value of your date as the partition key (may need other columns as you would only have 12 partitions in that case), and then query that column instead of the date. If the table is used for something else, the "cassandra way" would be to create a new table with the partition key you need to be able to support your query. – Jim Wartnick Jun 05 '19 at 12:37

0 Answers0