Time Filter and GMT Difference

7 views
Skip to first unread message

Albert C

unread,
Dec 14, 2009, 2:06:04 AM12/14/09
to Google Visualization API
Hello!

I have a very nice query working here:

http://spreadsheets.google.com/tq?tqx=out:html&tq=select%20C,B,%20sum%20%28I%29%20where%20C%20%3C=%20toDate%20%28now%28%29%29%20group%20by%20C,B%20order%20by%20C%20desc%20limit%2016%20label%20sum%20%28I%29%22Canchas%20Vendidas%22%20format%20sum%20%28I%29%20%270.00%27%20,%20%28C%29%20%27dd-MMM-yyyy%27%20&key=tC3Y1On9DhQFNVZo90dnIoA&pub=1

I have filtered column C like this: where C <= toDate (now())
However, the now() function returns the current datetime in the GMT
timezone.

How can I filter column C to be <= the current date in GMT -5 ?

Thanks in advance,

Albert C.

ChartMan

unread,
Dec 22, 2009, 5:19:05 PM12/22/09
to google-visua...@googlegroups.com
Hi 

Your query is indeed nice !!

There is no available query syntax to handle what you are asking for.
Also, both the query language and spreadsheets do not handle timezones.

However one solution is to add an extra (calculated) column to your spreadsheet with the following hack:

    =(FIXED(now()) - 5/24) - (FIXED(A1))
where A is the relevant data column.

Then, you can filter by the new column being smaller than zero.

HTH
ChartMan





--

You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.



Reply all
Reply to author
Forward
0 new messages