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

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 ?!

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

1 Like

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