I need a little help

Column A has the date and column C has the values, I need to keep the 
history in the spreadsheet but I am trying to select
 the previous 24 hours worth of data and present it into a line chart. 

The date being recorded is in this format '2013-06-25 07:00:00.000' but I'm 
struggling with my query.setQuery 
and I feel its a problem with my formatting

Can anyone recommend how I can construct my query, the code I'm using is 
below

Thanks

Carl

var d=new Date('2013-06-25 07:00:00.000');
 d.setDate(d.getDate()-1);
alert(d)

function drawVisualization() {
  
  var query = new google.visualization.Query(
      
'https://docs.google.com/a/printpack.com/spreadsheet/ccc?key=0AtrPmDPohJ6ndGVyMXpJUlJXR0VqcjNpaE1RcEh2VXc#gid=0'
);

  // Apply query language.
  query.setQuery("select A,C where A >= datetime d");
 
  
  // Send the query with a callback function.
  query.send(handleQueryResponse);
}

function handleQueryResponse(response) {
  if (response.isError()) {
    alert('Error in query: ' + response.getMessage() + ' ' + response.
getDetailedMessage());
    return;
  }

  var data = response.getDataTable();
  visualization = new google.visualization.LineChart(document.getElementById
('visualization'));
  var options ={
    width: 1500,height: 400
  }
  visualization.draw(data, options);
}

-- 
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