How to store/retrieve date in Aerospike database?


#1

How to store date in Aerospike database and retrieve data based on this date.

Consider query like Select * From Users Where StartDate < now(), how to retrieve data like this in Aerospike database??


How to filter records on the basis of customized datetime stamp format in Aerospike
#2
  1. Use a bin to hold the DateTime value as an integer
  2. Create a numeric secondary index on this bin
  3. Use a query with range filter to get the records back.

You can use the Unix/epoch time standard = number of seconds since January 1, 1970


#3

Thanks for quick response.