How to use obsService.getObservations if I want to get all data on a specific day such as 2014-2-2

How to use obsService.getObservations if I want to get all data on a specific day such as 2014-2-2

This method should be able to do that. only pass in the Date fromDate, Date toDate params and the others as null.

see comments here

1 Like

ok,thank you very much

hello,when I use the
Date date=simpleDateFormat.parse(“2020-3-20”); Date fromDate=OpenmrsUtil.firstSecondOfDay(date); Date toDate = OpenmrsUtil.lastSecondOfDay(date); List obsList = obsService.getObservations(null, null, null, null, null, null, null, null, null, fromDate, toDate, false); System.out.println(obsList.size()); return obsList; I got a bug:HTTP ERROR 500 javax.servlet.ServletException: org.springframework.web.util.Nest - Pastebin.com