fixed database find by date