<p>My problem had nothing to do with Craft. I simply handled the initial value that i got from the request wrong</p>

CC BY-SA 4.0
2021-12-22T12:11:20.130Z
2021-12-22T12:11:20.130Z
Leonardo
<p>I am trying to get entries where a specific number field is bigger than the given value.</p>
<p><a href="https://i.sstatic.net/UyoNf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/UyoNf.png" alt="enter image description here" /></a></p>
<p>But Craft is giving me the following response: <a href="https://i.sstatic.net/mgI90.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/mgI90.png" alt="enter image description here" /></a></p>
<p>Am i missing something or is this not supported for number fields?</p>
<p>Greetings</p>

CC BY-SA 4.0
2021-06-18T17:12:43.297Z
You're using ``%s`` (string) for [``sprintf``](https://www.php.net/manual/en/function.sprintf.php). If you change it do ``%d`` does it work? Not sure you need sprintf in this case?
RitterKnight
CC BY-SA 4.0
2021-06-18T19:19:53.757Z
Does it work like this? `Entry::find()->generation_to("> ${year}")`
MoritzLost
<craft3><entry><query>
Query Entry where number field is conditional to value
# Query Entry where number field is conditional to value

(Asked by: username_0 on 2021-06-18)

I am trying to get entries where a specific number field is bigger than the given value.

[![enter image description here](https://i.sstatic.net/UyoNf.png)](https://i.sstatic.net/UyoNf.png)

But Craft is giving me the following response: [![enter image description here](https://i.sstatic.net/mgI90.png)](https://i.sstatic.net/mgI90.png)

Am i missing something or is this not supported for number fields?

Greetings

**Tags:** craft3, entry, query

> **Comments:**
> **username_1**: You're using ``%s`` (string) for [``sprintf``](https://www.php.net/manual/en/function.sprintf.php). If you change it do ``%d`` does it work? Not sure you need sprintf in this case?  
> **username_2**: Does it work like this? `Entry::find()->generation_to("> ${year}")`  

---

## 1 answers

### Answer by username_0 on 2021-12-22. Score: 1 | Accepted answer

My problem had nothing to do with Craft. I simply handled the initial value that i got from the request wrong


---

