# Alarm expression for 'Enabled' does not work

**URL:** <https://forum.inductiveautomation.com/t/alarm-expression-for-enabled-does-not-work/11965>\
**Category:** Ignition\
**Created:** [July 22, 2016, 6:10pm UTC](https://forum.inductiveautomation.com/t/alarm-expression-for-enabled-does-not-work/11965 "2016-07-22T18:10:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@David](https://forum.inductiveautomation.com/u/David)\
**Post date:** [July 22, 2016, 6:10pm UTC](https://forum.inductiveautomation.com/t/alarm-expression-for-enabled-does-not-work/11965/1 "2016-07-22T18:10:29Z")

</div>

I am using the expression

dateExtract(now(0), “hour”) \>= 10 && dateExtract(now(0), “hour”) \<= 16

to limit the enabled period for an alarm. After 4 pm no new alarms should be generated, but they in fact are. Is there another setting that is needed to ensure this functions correctly?

thx

---

<div class="post-metadata">

**Author:** ![David](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@David](https://forum.inductiveautomation.com/u/David)\
**Post date:** [July 22, 2016, 6:14pm UTC](https://forum.inductiveautomation.com/t/alarm-expression-for-enabled-does-not-work/11965/2 "2016-07-22T18:14:08Z")

</div>

Ahem. Never mind.  
\<16 rather than \<=16
