I’m using a javascript lib called Any+Time: http://www.ama3.com/anytime/
I do the following:
var defaultConv = new AnyTime.Converter();
var dateTime = $("#DateTimeDemo").val();
var date = defaultConv.parse(dateTime);
alert(date);
dateTime is initalized to the string 2012-11-14 19:01: CE
But date ends up “Invalid data”?? why? Is the parser not working or am I doing something wrong?
EDIT:
By looking at the JS library source code, I think I have to pass Initialization values when creating new AnyTime.Converter But I’m not 100% sure.
Yes by the looks of it you have to pass a value to AnyTime.Converter(), here is mine: