# Issue month end report

**URL:** <https://forum.inductiveautomation.com/t/issue-month-end-report/72937>\
**Category:** Ignition\
**Created:** [April 26, 2023, 6:44pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937 "2023-04-26T18:44:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [April 26, 2023, 6:44pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/1 "2023-04-26T18:44:47Z")

</div>

I am trying to configure my start and end dates on a report that i am generating that is designed to cover a full month of data. Is there a way to set the start and end date parameters to recognize months? I am pulling data out of Ignition Historian if that matters.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 26, 2023, 6:59pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/2 "2023-04-26T18:59:23Z")

</div>

Your question is a bit underspecified, but perhaps you're looking for something like this?

> [@Ignition Report: Getting 1st day and last day of the month](https://forum.inductiveautomation.com/t/ignition-report-getting-1st-day-and-last-day-of-the-month/19745/3):
>
> First day of month: getDate( getYear({date}), getMonth({date}), 1 ) Last day of month: addDays( getDate( getYear({date}), getMonth({date}) + 1, 1 ), -1 )

---

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [April 26, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/3 "2023-04-26T20:25:20Z")

</div>

I am working in the Reporting Module and am trying to use the Start Date and End Date parameters for a dynamic query to cover all of the records for the current month. I will issue the report at 11:00 pm on the last day of the month. This report has to be issued on the last day of every month. I am using MySql for the query language. It doesn't like the wall clock time, it want's a duration. I have tried converting to a string as data type and still will not work.

---

<div class="post-metadata">

**Author:** ![stevenson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@stevenson](https://forum.inductiveautomation.com/u/stevenson)\
**Post date:** [April 27, 2023, 12:01am UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/4 "2023-04-27T00:01:27Z")

</div>

Wouldt this work for you?

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

Are you using the Tag historian source binding for the history? or via scripting? both should take a start and end date.

---

<div class="post-metadata">

**Author:** ![Neil\_Carty](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Carty](https://forum.inductiveautomation.com/u/Neil_Carty)\
**Post date:** [April 27, 2023, 5:20pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/5 "2023-04-27T17:20:21Z")

</div>

no i will not. I am using MySql. It appears that this will work up to ~10 days of history but after that there is something that is changed in the way the date is coded. I keep getting the following error "ERROR: The value '129:49:19' is an invalid TIME value. JDBC Time objects represent a wall-clock time and not a duration as MySQL treats them. If you are treating this type as a duration, consider retrieving this value as a string and dealing with it according to your requirements." i get it to work in MySQL by using Month(column) = Month(currentdate()) but i guess this is not compatiable coming from Ignition. I've tried in a named query as well and does not work.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [April 27, 2023, 5:26pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/6 "2023-04-27T17:26:58Z")

</div>

> [@Neil\_Carty](#):
>
> Month(column) = Month(currentdate())

For MySQL, its `current_date()` or `curdate()` not `currentdate()`. Maybe it's just a typo, but I thought I'd mention it. You could also use `now()`

---

<div class="post-metadata">

**Author:** ![stevenson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@stevenson](https://forum.inductiveautomation.com/u/stevenson)\
**Post date:** [April 27, 2023, 5:34pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/7 "2023-04-27T17:34:35Z")

</div>

Can you show us how you're querying the historian database? I'm unsure where/how you're getting the date objects casted to duration.

---

<div class="post-metadata">

**Author:** ![Anthony\_Ho1](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@Anthony\_Ho1](https://forum.inductiveautomation.com/u/Anthony_Ho1)\
**Post date:** [May 14, 2025, 8:09pm UTC](https://forum.inductiveautomation.com/t/issue-month-end-report/72937/8 "2025-05-14T20:09:40Z")

</div>

won't work for December
