setting date parameter for today to capture current time in reporting module

Hi everyone, I am using openmrs 2.2.1 and reporting module 1.21.0. I have created a report using report module which take parameter “startDate” and “endDate”. The challenge I am having is that when I select end date of today’s date openmrs uses time 00:00:00(midnight the beggining of the day) instead of current time which means all the data collected today do not display in the report. But if you select tomorrow’s date then even the data of today is captured. It is a little bit confusing for the users.

Question: Is there somewhere to setup so that if I select today’s date it captures date with current time or up to 23:59:59 time?

I wanted to use the option of selecting datetime but on the creation of dataset on reporting module there is no datetime parameter only date and i could not figure out the advanced configuration.

make your endDate parameter look like this ${endDate+23h} which will evaluate to accuracy to 2300 hours of the day, you if you want to the minutes level, you can adjust that too

1 Like

Thank you very much, apparently I did not look at the documentation page up to the end. What I wanted to know is explained in the wiki https://openmrs.atlassian.net/wiki/spaces/docs/pages/25482792/Building+Reports+Step+By+Step+Guide#BuildingReports(StepByStepGuide)-startDateandendDate .

1 Like