asimlqt / php-google-spreadsheet-client

A PHP library for accessing and manipulating Google Spreadsheets
Other
543 stars 154 forks source link

Can not use sq parameter to filter by date #126

Closed malbalat85 closed 8 years ago

malbalat85 commented 8 years ago

I want to use the sq parameter to filter some rows by date, but it doesn't work at all. I search the API and see that you pass it to the getListFeed function as an array('sq' => 'date>3/2/2016') but it doesn't work. Even if you want to filter using text way the only way to make it work it's like this array('sq' => 'texttofind=="searchtext"') and if you find google doc there is no mention about this. There is another way to make such thing?

Thanks in advance

asimlqt commented 8 years ago

I've just tested the following and it works fine: $listFeed = $worksheet->getListFeed(["sq" => "age > 20 and age < 30"]);

I'm not sure how i handles dates, you maybe better of using timestamps instead or you can use dates in format "YYYY-MM-DD", you can then do correct string comparisons.