Got search by date working with postgres