Date time deplay fix
Fix crash during query analyzing

The first column is date, so query.value(i) should be query.value(i + 1)
instead.