Realm-js Querying on timeStamp does not work

799 Views Asked by At

This is with reference to https://realm.io/docs/javascript/latest/api/tutorial-query-language.html

I am not looking for variable substitution syntax as mentioned in the documentation.

So i have a date field by the name createDate, and i am trying to query on the same. The filter query looks like createDate = ${someDate}, where somedate is in the format 'YYYY-MM-DD@HH:mm:ss', i also tried == instead of = in the query, but this simply does not work;

1

There are 1 best solutions below

0
On

its hard to say without seeing how you're actually writing the query, but it could be how you're constructing it. maybe try

    filtered('createDate = $0', someDate)

using a placeholder variable ($0) solves query problems in realm for me