javascript - Uncaught Error: Type mismatch in Date value -


i using google chart , need specify date in js format.

 arrdata.addcolumn('date','observationdatetime'); 

as needs js format date, converted sql date js date , looks this

2014,08,01 

however, still error says ::

uncaught error: type mismatch. value 2014,08,01  not match type date in column index 0 

how fix ? why error when date looks in js format me?\

edit:

here how converting , forwarding in json.

string datestring = datetime.tostring(); stringtokenizer datetokens = new stringtokenizer(datestring,"-"); string observationdatetime = "";     while(datetokens.hasmoretokens()){         string tokenis = datetokens.nexttoken();         observationdatetime = observationdatetime  + tokenis +",";     }     int finaldatelength = observationdatetime.length();     observationdatetime = observationdatetime.substring(0,finaldatelength-1); string observationsource = rs.getstring("observationsource");  float observationvalue = rs.getfloat("observationvalue");   obj = new jsonobject(); obj.put("observationdatetime", observationdatetime); details.add(obj); } resobj.put("details", details); out.write(resobj.tostring());  } 


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -