issue to query data filtered by Date from fusion table

本秂侑毒 提交于 2019-12-11 17:55:12

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/9635569/issue-to-query-data-filtered-by-date-from-fusion-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!