Issue month end report

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.

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

1 Like

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.

Wouldt this work for you?

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

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.

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()

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.