I need the date to show in this format 2014-11-04 as "yy mm dd"
Currently, my script still shows me Tue Nov 04 2014 00:00:00 GMT+0200 (Egypt Standard Time)
$(document).ready(function() {
var userDate = '04.11.2014';
from = userDate.split(".");
f = new Date(from[2], from[1] - 1, from[0]);
console.log(f);
});