How to write a range query on substring of a field?


(Ali.Houshy) #1

Hi, I have an index with name user that have two date field with names created_at and expired_at and format yyyy-MM-dd HH:mm:ss.
Now I want to write a range query using them that check only time substring of them, not date and time, only HH:mm:ss

How should I write it ?!
Anyone can help me ?!


(David Pilato) #2

You should index the second of the day in a specific field to do that.
That'd be more efficient than anything else.


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.