Question

I'm trying to write a small javascript code to query data filtered by date.

If I write the following sentence in my browser, I can get data : "http://www.google.com/fusiontables/gvizdata?tq=SELECT Date, Poids FROM 3049883"

but if I write the same thing, except I want only data after a certain date :

"http://www.google.com/fusiontables/gvizdata?tq=SELECT Date, Poids FROM 3049883 WHERE Date > 2/29/12"

From the SQL-like API, https://developers.google.com/fusiontables/docs/developers_reference#Select, it should work

I get an error witch is "'internal_error', message:'Could not parse query'"

-Date is a DATETIME format in my fusion table.

-I've tried different format, but I can not get data.

What am I doing wrong?

Thank you very much for your help.

Was it helpful?

Solution

The Date value must be quoted and the format is MM/dd/yy so you must pad single digits with leading zeros. I had success with:

select Date,Poids from 3049883 where Date >= '02/29/12'

Note: I did not test with gvizdata, just with the FT JSONP API

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top