Sorry I don't pretend to a programmer. I dissected your code a little, so I 
could understand it a bit more. Also changed the final query a little and 
this is what I came up with.

var d=new Date();
> d.setDate(d.getDate() - 1);
>
> var year = d.getFullYear();  
> var month = d.getMonth() + 1;
> var day = d.getDate();
> var hour = d.getDate();
> var minute = d.getDate();
> var second = d.getDate();
> var microsecond = d.getDate();
>
> if (month.toString().length == 1) {
>     month = '0' + month;
> }
>
> if (day.toString().length == 1) {
>     day = '0' + day;
> }
>
> if (hour.toString().length == 1) {
>     hour = '0' + hour;
> }
>
> if (minute.toString().length == 1) {
>     minute = '0' + minute;
> }
>
> if (second.toString().length == 1) {
>     second = '0' + second;
> }
>
> while(microsecond.toString().length < 3) {
>     microsecond = '0' + microsecond;
> }
>
> var dateString = year + '-' + month + '-' + day + ' ' + hour + ':' + 
> minute + ':' + minute+ '.' + microsecond;
>
> //var d = '2013-06-26 07:00:00.000';
> //d.setDate(d.getDate()-1);
> alert(dateString);
>
> function drawVisualization() {
>   
>   var query = new google.visualization.Query(
>       'https://docs.google.com/a/printpack.com/spreadsheet/ccc?key=keycode 
> here');
>
>   // Apply query language.
>  query.setQuery("select A,C where A >= datetime  '" + dateString + "' ");


This is the error I'm now getting 

<https://lh4.googleusercontent.com/-EWxVJXSpih4/Ucsb--jFBTI/AAAAAAAAAiU/ZRgplnlkNao/s1600/sshot.png>

 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to