If not, can you show us the full method where you want to replace the date code?

EDIT: Here is the updated version for your full method. Basically how it works is that once you get an instance of the Calendar object it maintains its state. Since you are not planning on changing the hours it only has to be set once. Since you are updating the minutes from your query you will have to set it again before calling calendar.getTime().