# Zeroing variable daily - not midnight

**URL:** <https://forum.inductiveautomation.com/t/zeroing-variable-daily-not-midnight/48989>\
**Category:** Ignition\
**Created:** [July 20, 2021, 2:14pm UTC](https://forum.inductiveautomation.com/t/zeroing-variable-daily-not-midnight/48989 "2021-07-20T14:14:00Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [August 4, 2021, 1:25pm UTC](https://forum.inductiveautomation.com/t/zeroing-variable-daily-not-midnight/48989/10 "2021-08-04T13:25:21Z")

</div>

Another option is to eliminate the need for resetting. See this post:

> [@Tag history difference over interval](https://forum.inductiveautomation.com/t/tag-history-difference-over-interval/48366/2):
>
> With the help of @JordanCClark (thanks, didn’t know about zip), I ended up with the below script. It will take a history tag (integer, float, double) and find the difference over hour intervals between a start and end date. Any value over 0 will be counted. You can rollover at any time, although your process may deem it necessary to only rollover if you aren’t running. You can then use this is a bar chart, for example, to show counts per hour over time. If the tag doesn’t exist, it should j…

---

_[View the full topic](https://forum.inductiveautomation.com/t/zeroing-variable-daily-not-midnight/48989)._
