FWIW, my workaround is:
function MassageTable(dataTable,ColumnIDMap) {
var dateCol = ColumnIDMap['timebin']; // your date column id should
be defined here
for (var i=0;i<dataTable.getNumberOfRows();i++) {
dateVal = dataTable.getValue(i,dateCol);
// If it's already a date, do nothing
if (dateVal instanceof Date) {continue;}
evalStr = 'new ' + dateVal;
newDate = eval(evalStr);
dataTable.setValue(i,dateCol,newDate);
}
return dataTable;
}
On Jun 2, 2:53 pm, NA <[email protected]> wrote:
> Hi,
>
> I get the error below when using datetimes. Any idea what causes
> this?
>
> Uncaught Error: Type mismatch. Value Date(2011,5,1,14,0,0) does not
> match type datetime in column index 0
>
> This should be a valid datetime. In fact, I have been using Date
> objects like this and haven't seen this error before. It only happens
> when my script for producing charts is called from within another
> website. When the script is called directly, there is no error.
>
> Any ideas?
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.