<p>I believe this link solves your issue.
<a href="https://docs.craftcms.com/v3/date-time-fields.html#settings" rel="nofollow noreferrer">https://docs.craftcms.com/v3/date-time-fields.html#settings</a></p>

CC BY-SA 4.0
2019-07-12T08:22:31.603Z
What if the field isn't a datetime field?
Davina Leong
CC BY-SA 4.0
2019-07-12T09:56:56.403Z
As long as it is not an element field like matrix, category, asset, entry. You can apply something similar to it.
Parry Huang
CC BY-SA 4.0
2019-07-12T08:14:41.813Z
2019-07-12T08:14:41.813Z
Parry Huang
<p>I have a set of events I want to query based on user-input date times.
How do I achieve something like this?</p>

<pre><code>{% set entries = craft.entries.section('events').minScheduleDate('&gt;=', 'now').maxScheduleDate('&lt;=', 'now') %}
</code></pre>

<p>Where <code>maxScheduleDate</code> is a field for user to input date?</p>

<entries><field><datetime><query>
Find Entries based on Field Values
# Find Entries based on Field Values

(Asked by: username_0 on 2019-07-12)

I have a set of events I want to query based on user-input date times.
How do I achieve something like this?
{% set entries = craft.entries.section('events').minScheduleDate('>=', 'now').maxScheduleDate('<=', 'now') %}

Where maxScheduleDate is a field for user to input date?

**Tags:** entries, field, datetime, query


---

## 1 answers

### Answer by username_1 on 2019-07-12. Score: 1 | Accepted answer

I believe this link solves your issue.
<https://docs.craftcms.com/v3/date-time-fields.html#settings>

> **Comments:**
> **username_0**: What if the field isn't a datetime field?  
> **username_1**: As long as it is not an element field like matrix, category, asset, entry. You can apply something similar to it.  

---

