Il file l'ho scaricato da qui (html.it)

Ecco il codice:

codice:
function str2dt (str_datetime) {
var re_date = /^(\d+)\-(\d+)\-(\d+)\s+(\d+)\\d+)\\d+)$/; 
if (!re_date.exec(str_datetime))
return alert("Formato data non valido: "+ str_datetime);
return (new Date (RegExp.$3, RegExp.$2-1, RegExp.$1, RegExp.$4, RegExp.$5, RegExp.$6));