Datetime query by month error


I am using version 20.11.3
I want to query the nodes within a certain month

I have this index
created: datetime @index(month) .

The date data I have has this format:


I have this query
@filter(eq(created, [“10”]))

but i get this error:

“message”: ": Got error: parsing time “10” as “2006-01-02T15:04:05”: cannot parse “10” as “2006” while running: name:“eq” args:“10” ",
“extensions”: {
“code”: “ErrorInvalidRequest”*

I do not have any in my nodes with the year 2006.

Do I have something wrong with my query?
On the other hand, could you ask: give me all the nodes of the day “Friday” or “Saturday”, etc.?

Thank you.

You have to use the format RFC3339
e.g. 2006-01-02T15:04:05.999999999+10:00

That’s not possible. There’s no calendar control as far as I know.

Here may be some more context:

Thank you both for your answer.
I think that to get the nodes of a specific day of the week I am going to calculate the day in my Java application and when I insert the node I will insert it in a different predicate than the date.


1 Like