# How to add custom timestamp in Reports?

**URL:** <https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379>\
**Category:** Ignition\
**Created:** [November 18, 2016, 9:48am UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379 "2016-11-18T09:48:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielFVS](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@DanielFVS](https://forum.inductiveautomation.com/u/DanielFVS)\
**Post date:** [November 18, 2016, 9:48am UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379/1 "2016-11-18T09:48:56Z")

</div>

Hello,

I am trying to do a Daily Report of many realtime values, my objective is to create a page in the Designer that can let me see the actual reported values at the moment since the beggining of the day to the end (0:00 of day 1 to 0:00 of day 2).

My problem is that I can’t figure that out, I tried many things, i made some tests and researches but it wasn’t what I wanted.

For example, at this moment its 9 AM, if I went to see my Daily Report it would not start at midnight like I wanted, it would start at 9AM of the past day, and that is quite an issue because the values ate not always the same and it’s confusing…

Can someone help me please, i really, REALLY appreciate it! 😃

Thank you.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [November 18, 2016, 3:14pm UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379/2 "2016-11-18T15:14:38Z")

</div>

I’m not 100% sure what you’re asking for, so please let me know if I’m off the mark with my answer.

It looks like you want to create a parameter that is always midnight of the current day, which you can then use to control the starting time of your report. If you’re running 7.9.x, you can use the expression `midnight(now())` ([docs](https://docs.inductiveautomation.com/display/DOC79/midnight)).

In 7.8.x it’s a bit clunkier – `todate(dateformat(now(0), "YYYY-MM-dd") + " 00:00:00")`

---

<div class="post-metadata">

**Author:** ![DanielFVS](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@DanielFVS](https://forum.inductiveautomation.com/u/DanielFVS)\
**Post date:** [November 21, 2016, 11:20am UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379/3 "2016-11-21T11:20:33Z")

</div>

[quote=“KathyApplebaum”]I’m not 100% sure what you’re asking for, so please let me know if I’m off the mark with my answer.

It looks like you want to create a parameter that is always midnight of the current day, which you can then use to control the starting time of your report. If you’re running 7.9.x, you can use the expression `midnight(now())` ([docs](https://docs.inductiveautomation.com/display/DOC79/midnight)).

In 7.8.x it’s a bit clunkier – `todate(dateformat(now(0), "YYYY-MM-dd") + " 00:00:00")`[/quote]

Yes, that’s what I need, Thank You!

Do You mind if I take advantage of this post to ask you another question?

I tried to add to my Table the Duration of one Tag when its “ON”(the Tag is a boolean and the value).  
I’ve created another Tag Historian Query just for that Tag and configured the “Aggregation Mode” to: Duration On (Seconds) \> Wide \> Interval \> Every 60 minutes. But the result is always zero and I know that the current value of the Tag is “True”.

Am I doing something wrong? ![:/](https://us1.discourse-cdn.com/inductiveautomation/original/1X/8e510869ae26fbd7ab76e1e731ceea2054ef109c.gif "Hrm")

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [November 21, 2016, 3:45pm UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379/4 "2016-11-21T15:45:33Z")

</div>

Is this still in reporting? If so, use a Tag Calculation query instead.

---

<div class="post-metadata">

**Author:** ![DanielFVS](https://avatars.discourse-cdn.com/v4/letter/d/4da419/32.png) [@DanielFVS](https://forum.inductiveautomation.com/u/DanielFVS)\
**Post date:** [November 28, 2016, 2:49pm UTC](https://forum.inductiveautomation.com/t/how-to-add-custom-timestamp-in-reports/12379/5 "2016-11-28T14:49:26Z")

</div>

Yes, it is.

Is there any way to show the time in minutes for every hour of the day, when the function is true?
