how do I format a javascript date like ISO format, but in local time?
with myDate.toISOString() I am getting the time as: \"2012-09-13T19:12:23.826Z\">
AFAIK you can't format dates in javascript (without using external libraries). The best you could do is "format it yourself". I mean:
var date = new Date();
var year = date.getFullYear();
var month = date......
var ISOdate = year + "-" + month + "-" + .... ;
But there are some good libraries that will let you format dates! (read "format" as in library.getDate("YYYY-MM-DD.........");)
EDIT:
Moment.js seems the thing you're looking for: http://momentjs.com/