How to get time interval in PHP ?

I need to get data from 20 June 2017 to 21 June 2017 in PHP, How do I achieve this ?
I tried this but it is not working

$query->setWhereClause("created at or after '20-06-2017' AND created  before '22-06-2017'");
$x= Backendless::$Persistence->of("xxx")->find($query);    

Does Backendless date function does not support AND ?

Turns out there is a problem with my date format, it is working now