# Reports-Historian query Timeseries charts not displaying the correct date ranges

**URL:** <https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714>\
**Category:** Ignition\
**Created:** [September 17, 2025, 2:09pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714 "2025-09-17T14:09:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Jaffe](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@Alex\_Jaffe](https://forum.inductiveautomation.com/u/Alex_Jaffe)\
**Post date:** [September 17, 2025, 2:09pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714/1 "2025-09-17T14:09:10Z")

</div>

I am having a problem with my reports.

I currently have a series of VFD’s and their associated interlocks historized and mapped to a series of timeseries charts. In the designer and preview they seem to be working properly, but I have a schedule to send to an email address and when they arrive, the date range is wrong.

Here is what i have set for my start date/end date/history date setup

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95aa78bcfc43c8103dcac9bc45bc19f588ed6368.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/e/3e72698cf81c04c0c639dd465bfaae415df0e0a0.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/9325d32742f78375e553407ffef3c296fbead1c4.png)

here is what the page looks like in preview (what i want it to look like)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac69fc52886b1e85eaae1fa4e0984439b16592a7.png)

Here is what it looks like when it is received as a pdf via email

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/700bb6d644e65bd8d5e859fc03cac0b8de5323a9.png)

Instead of the timespan being 24 hr for the previous day, it is the last 3 days. i am not sure what is causing this or why it is different between the preview and pdf.

any help is appreciated, thanks.

---

<div class="post-metadata">

**Author:** ![Alex\_Jaffe](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@Alex\_Jaffe](https://forum.inductiveautomation.com/u/Alex_Jaffe)\
**Post date:** [September 17, 2025, 2:09pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714/2 "2025-09-17T14:09:44Z")

</div>

also note, I have other reports active that are working just fine when sent to email

---

<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:** [September 17, 2025, 2:19pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714/3 "2025-09-17T14:19:30Z")

</div>

just a quick comment on your start date expression. It seems like you’re trying to get midnight of the previous day. A cleaner way to do that would be  
`midnight(dateArithmetic(now(), -1, “day”))`

For your end date you can do  
`dateArithmetic(midnight(now()), -1, “second”)`

---

<div class="post-metadata">

**Author:** ![Alex\_Jaffe](https://avatars.discourse-cdn.com/v4/letter/a/ecccb3/32.png) [@Alex\_Jaffe](https://forum.inductiveautomation.com/u/Alex_Jaffe)\
**Post date:** [September 17, 2025, 2:23pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714/4 "2025-09-17T14:23:08Z")

</div>

didn’t realize there was a midnight function, thank you, that will help simplify things

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [September 17, 2025, 2:31pm UTC](https://forum.inductiveautomation.com/t/reports-historian-query-timeseries-charts-not-displaying-the-correct-date-ranges/110714/5 "2025-09-17T14:31:42Z")

</div>

For your future referencing:

> **[Expression Functions | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions)**
>
> The expression language is used to define dynamic values for component properties and expression tags. Expressions often involve one or more other values that are used to calculate a final value. Expressions don't do anything, other than return a...
