# Effective date range

**URL:** <https://forum.inductiveautomation.com/t/effective-date-range/7434>\
**Category:** Ignition\
**Created:** [October 17, 2013, 10:31pm UTC](https://forum.inductiveautomation.com/t/effective-date-range/7434 "2013-10-17T22:31:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [October 17, 2013, 10:31pm UTC](https://forum.inductiveautomation.com/t/effective-date-range/7434/1 "2013-10-17T22:31:30Z")

</div>

Trying to setup an effective on and effective until date range that would set a tag to 1 if the current date is within range.

Something along these lines (except functional…):  
IF Now \> {Root Container.Eff Date.date} AND \< {Root Container.Eff Until.date}  
system.tag.writeToTag(“tag”, 1)

Thank you for your assistance

---

<div class="post-metadata">

**Author:** ![george](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/george/32/14066_2.png) [@george](https://forum.inductiveautomation.com/u/george)\
**Post date:** [October 18, 2013, 7:54am UTC](https://forum.inductiveautomation.com/t/effective-date-range/7434/2 "2013-10-18T07:54:30Z")

</div>

Use the following Expression:

```auto
timeBetween(now(),{Root Container.Eff Date.date},{Root Container.Eff Until.date})
```

Should return TRUE if it’s between the dates or FALSE if not.

Obviously you could put that directly into some binding or alternatively create an expression tag if you need it in a tag.
