Custom Boundary on date dataelement

I need to write a Program indicator that use a custom boundary. This boundary use a date data element.
for example (I would like to count all the events that occurred within the custom boundary period).
I put as in the image:

When i running my indicator i get this error: invalid input syntax for type timestamp

1 Like

Hi @simone !

It looks like youve attempted to use custom analytics period boundaries with a data element of type DATETIME, which is causing the error. This reproduces on 2.35.1 play as well and appears to be a bug, could you please open a ticket on JIRA?

As a solution, you could try a period indicator with no analytics period boundaries, but use event type and event count expression, with this filter:
d2:daysBetween(V{analytics_period_start}, #{uvMKOn1oWvd.tz1T2EbIOWq})>=0 && d2:daysBetween(#{uvMKOn1oWvd.tz1T2EbIOWq}, V{analytics_period_end})>=0
where #{uvMKOn1oWvd.tz1T2EbIOWq} is your DATETIME data element.

For reproducible example: I downloaded the metadata for this test from:
If you import the metadata file below back into the system, add a value for ‚Äúdatetime‚ÄĚ data element (in program Malaria Focus Investigation, Stage Foci response), then run analytics, you should be able to see a value at this link.