# Inserting date and time on condition

**URL:** <https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157>\
**Category:** Ignition\
**Created:** [November 30, 2018, 2:42pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157 "2018-11-30T14:42:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schwartzds](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/schwartzds/32/6777_2.png) [@Schwartzds](https://forum.inductiveautomation.com/u/Schwartzds)\
**Post date:** [November 30, 2018, 2:42pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157/1 "2018-11-30T14:42:09Z")

</div>

Anyone have any quick ways of displaying current date and time once a Boolean condition is met?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2018, 2:52pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157/2 "2018-11-30T14:52:30Z")

</div>

Globally or per-client? Once forever? Or resets when condition becomes false? Or resets manually? Or resets when the client restarts?

Etc, etc, etc. Please describe your use-case in more detail.

---

<div class="post-metadata">

**Author:** ![Schwartzds](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/schwartzds/32/6777_2.png) [@Schwartzds](https://forum.inductiveautomation.com/u/Schwartzds)\
**Post date:** [November 30, 2018, 5:09pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157/3 "2018-11-30T17:09:49Z")

</div>

I am looking for it to be when the condition changes. It is a filter lets us know when a test occurs. The tag will go to true once this has occurred and stay true until 00:00. I just want it to record when the tag first becomes true. Hope this helps.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2018, 5:24pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157/4 "2018-11-30T17:24:32Z")

</div>

The simplest would be to create a memory tag of type date/time and write to it from a Gateway Tag Change Event script (that watches the boolean). [This part of Inductive University](https://www.inductiveuniversity.com/video/tag-change-scripts) will help you get started.

---

<div class="post-metadata">

**Author:** ![Schwartzds](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/schwartzds/32/6777_2.png) [@Schwartzds](https://forum.inductiveautomation.com/u/Schwartzds)\
**Post date:** [November 30, 2018, 6:05pm UTC](https://forum.inductiveautomation.com/t/inserting-date-and-time-on-condition/21157/5 "2018-11-30T18:05:34Z")

</div>

Ok, that helped a bit. I will have to work on it. Hopefully not too difficult.  
Thanks!!
