# Condition to check the day of the week

**URL:** <https://discourse.nodered.org/t/condition-to-check-the-day-of-the-week/90735>\
**Category:** General\
**Created:** [5 September 2024 12:37 UTC](https://discourse.nodered.org/t/condition-to-check-the-day-of-the-week/90735 "2024-09-05T12:37:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [5 September 2024 12:57 UTC](https://discourse.nodered.org/t/condition-to-check-the-day-of-the-week/90735/2 "2024-09-05T12:57:00Z")

</div>

@jbudd showed you how to get the day of the week using getDate() (value 0-6, sun to sat). [here](https://discourse.nodered.org/t/inputing-data-in-to-different-gauges-on-for-each-day-of-the-week/90704/2)  
You can use that outptut in a msg property, then use a switch node to direct, where rules would be -  
Property would be value you save the 0-6 in  
Rule 1 `== (number) 0`  
Rule 2 `== (number) 1`  
etc.

---

_[View the full topic](https://discourse.nodered.org/t/condition-to-check-the-day-of-the-week/90735)._
