NSMutableArray qualifiers = new NSMutableArray();
GregorianCalendar calendarStartDate = new GregorianCalendar();
calendarStartDate.setTime(startingDate);
int startDay = calendarStartDate.get(GregorianCalendar.DAY_OF_MONTH);
int startMonth = calendarStartDate.get(GregorianCalendar.MONTH);
int startYear = calendarStartDate.get(GregorianCalendar.YEAR);
int startHour = 0;
int startMinute = 0;
if(reportParameters.valueForKey("startHour") != null)
startHour = Integer.parseInt((String)reportParameters.valueForKey("startHour"));
if(reportParameters.valueForKey("startMinute") != null)
startMinute = Integer.parseInt((String)reportParameters.valueForKey("startMinute"));
NSTimestamp startDate = new NSTimestamp(startYear,startMonth+1,startDay,startHour,startMinute,0,NSTimeZone.defaultTimeZone());
GregorianCalendar calendarEndDate = new GregorianCalendar();
calendarEndDate.setTime(stoppingDate);
int endDay = calendarEndDate.get(GregorianCalendar.DAY_OF_MONTH);
int endMonth = calendarEndDate.get(GregorianCalendar.MONTH);
int endYear = calendarEndDate.get(GregorianCalendar.YEAR);
int endHour = 0;
int endMinute = 0;
if(reportParameters.valueForKey("endHour") != null)
endHour = Integer.parseInt((String)reportParameters.valueForKey("endHour"));
if(reportParameters.valueForKey("endMinute") != null)
endMinute = Integer.parseInt((String)reportParameters.valueForKey("endMinute"));
NSTimestamp endingDate = new NSTimestamp(endYear,endMonth+1,endDay,endHour,endMinute,0,NSTimeZone.defaultTimeZone());
EOQualifier startDateQualifier = new EOKeyValueQualifier("elapsedTime",EOQualifier.QualifierOperatorGreaterThanOrEqualTo,startDate);
qualifiers.addObject(startDateQualifier);
EOQualifier stopDateQualifier = new EOKeyValueQualifier("elapsedTime",EOQualifier.QualifierOperatorLessThanOrEqualTo,endingDate);
qualifiers.addObject(stopDateQualifier);
.....
EOFetchSpecification stsFetchSpecification = new EOFetchSpecification(<ENTITY-NAME>,new EOAndQualifier(qualifiers),null);
NSArray entityObjects = editingContext.objectsWithFetchSpecification(stsFetchSpecification);
......