# Reset Time Meter Value at Midnight

**URL:** <https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074>\
**Category:** Ignition\
**Created:** [August 29, 2012, 9:05pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074 "2012-08-29T21:05:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfenter](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dfenter](https://forum.inductiveautomation.com/u/dfenter)\
**Post date:** [August 29, 2012, 9:05pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074/1 "2012-08-29T21:05:00Z")

</div>

I am trying to measure the uptime and downtime of our process.

I have setup a transaction group where an expression tag named uptime uses the time meter to determine the uptime of our process.

How can I get the time meter value to reset to zero at midnight?

Dan

---

<div class="post-metadata">

**Author:** ![Robert.McKenzie](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/robert.mckenzie/32/4134_2.png) [@Robert.McKenzie](https://forum.inductiveautomation.com/u/Robert.McKenzie)\
**Post date:** [August 29, 2012, 9:29pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074/2 "2012-08-29T21:29:54Z")

</div>

The most common case for logging hour or event meters to the database is to have new records default to all 0 values. Then just adding a new record will zero your values.

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [August 29, 2012, 9:47pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074/3 "2012-08-29T21:47:06Z")

</div>

You can also reset hour and event meters now from a tag. So if you create an expression SQLTag that is equal to 1 and midnight, it can be used to reset the hour or event meters.

---

<div class="post-metadata">

**Author:** ![dfenter](https://avatars.discourse-cdn.com/v4/letter/d/87869e/32.png) [@dfenter](https://forum.inductiveautomation.com/u/dfenter)\
**Post date:** [August 29, 2012, 10:15pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074/4 "2012-08-29T22:15:14Z")

</div>

So once I set up the tag that is equal to one at midnight, should I do a write target to the uptime tag?

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [August 29, 2012, 10:52pm UTC](https://forum.inductiveautomation.com/t/reset-time-meter-value-at-midnight/5074/5 "2012-08-29T22:52:48Z")

</div>

No, he’s referring to this option on the tag config. This was introduced in 7.5 (I think? Maybe 7.4, can’t remember).  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/3/3cf64f3b35be28f076740dbef7f0b7e674bab433.png)
