In my app i query data from server by comparing created value on server with the value saved on the device.
When whereClause looks like this: “05/10/2016 16:20:00 > 04/04/2016 00:00:00”, then everything is okay.
If it looks like this: “05/10/2016 16:20:00 > 05/10/2016 16:00:00” it returns nothing.
Thanks in advance!
let operation = OperationsBackendless()
print(lastUpdateOperations)
let whereClause = "((companyId = '\(companyIdentifier!)' AND created > '\(lastUpdateOperations!)' AND deleted = false) OR (updated > '\(lastUpdateOperations!)' AND deleted = true))"
let dataQuery = BackendlessDataQuery()
dataQuery.whereClause = whereClause
print(whereClause)
let startTime = NSDate()
backendless.persistenceService.of(operation.ofClass()).find(
dataQuery,
response: { ( operations : BackendlessCollection!) -> () in
let currentPage = operations.getCurrentPage()
print("Loaded \(currentPage.count) objects")
for operaton in currentPage as! [OperationsBackendless] {
print("operation name = \(operaton.documentName)")
}
updateDefaultsTime()
print("Total time (ms) - \(1000*NSDate().timeIntervalSinceDate(startTime))")
},
error: { ( fault : Fault!) -> () in
print("Server reported an error: \(fault)")
}
)