small sql date time comparison fix