# IF node results in the wrong branch

**URL:** <https://community.n8n.io/t/if-node-results-in-the-wrong-branch/126249>\
**Category:** Questions\
**Tags:** if\
**Created:** [June 3, 2025, 4:48pm UTC](https://community.n8n.io/t/if-node-results-in-the-wrong-branch/126249 "2025-06-03T16:48:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jabbson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jabbson/32/87328_2.png) [@jabbson](https://community.n8n.io/u/jabbson)\
**Post date:** [June 3, 2025, 4:48pm UTC](https://community.n8n.io/t/if-node-results-in-the-wrong-branch/126249/1 "2025-06-03T16:48:24Z")

</div>

## Describe the problem/error/question

When checking for a condition if the IF node, always ending up with the False branch in the output, even though both conditions (connected by AND) are True.

## What is the error message (if any)?

no error messages

## Please share your workflow

## Share the output returned by the last node

As you can see from the screenshot, the value for .getHours() for me right now is **13** , which is greater than 8 and less than 14, which makes the whole thing **“True AND True”** , and should in theory result in a True branch, but somehow the workflow takes the False branch out.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/a/5aecce654c1b457d5e9b6870d16aa96dd51be081.png)  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/5/f/5f19488d4eac323b0b535e91e1870beac9c99483.png)

The same happens for when I check the hour as boolean:

Another thing I tried was setting the value of the hour with an **Edit Fields** node before entering the **IF** node like so:

This attempt showed another (or a part of the same really) problem:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/3/7/379a0eca9a3e367aa2fe4f77d0298fbdf06a76f7.png)

Result and output do not match.

## Information on your n8n setup

- **n8n version:** 1.94.1
- **Database (default: SQLite):** Postgres
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):** default
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** Docker
- **Operating system:** MacOS

---

<div class="post-metadata">

**Author:** ![darrell\_tw](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/darrell_tw/32/52180_2.png) [@darrell\_tw](https://community.n8n.io/u/darrell_tw)\
**Post date:** [June 3, 2025, 4:55pm UTC](https://community.n8n.io/t/if-node-results-in-the-wrong-branch/126249/2 "2025-06-03T16:55:38Z")

</div>

I am not really sure the issue.

But I suggest use the `{{ $now.hour }}` and everything will be fine.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [June 10, 2025, 4:55pm UTC](https://community.n8n.io/t/if-node-results-in-the-wrong-branch/126249/3 "2025-06-10T16:55:46Z")

</div>

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