How to query by RealmInstant?

Example class in kotlin sdk:

class Workout : RealmObject {
var id: RealmUUID = RealmUUID.random()
var created: RealmInstant? =

Example call (empty result):

val workouts = realm.query(Workout::class, query = “date < $0”,

I did’nt find anything in the documentation how to query Realminstant:.

Anyone knows how to create the query or what datatype i should use instead?

Hi Michael, welcome to the MongoDB community!

It looks like you’re querying against the wrong property name from your class (‘date’ instead of ‘created’). Try updating to this:

val workouts = realm.query(Workout::class, query="created < $0",

Let me know if you’re still having issues.