How to store value time.Time in Aerospike

I’m using golang, I need to store value type of time.Time in Aerospike.


-Authenticate At =>>

  AuthenticatedAt  sqlxx.NullTime      `json:"-" db:"authenticated_at" as:"authenticat"`
  type NullTime time.Time

-before but it store in database value like :

-Aerospike {0 63748551960 <nil>}  
-postgres =>{0 63748553281 <nil>}

-in table in postgres store:

2021-02-08 15:12:25

-in Aerospike store :


if any way to store time.Time in Aerospike.

Hey Isra, Did you have a chance to look at the test code for objects? Maybe you’ll find these examples useful:


1 Like


How did you get that output? AQL is awful at dealing with map objects - not sure if map objects is the intention - but wanted to know if using aql. Why not store Time as long?

1 Like
© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.