Monday, August 6, 2012

dd-mm-yyyy in javascript

date format in javascript dd mm yyyy



Chang date format in JavaScript

function datef(x){
var arr = new Array();
arr=["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
arr2=x.split('-');
i=parseInt(arr2[1],10);
d=arr2[2]+"-"+arr[i]+"-"+arr2[0];
return d;
}

No comments:

Post a Comment

If you Satisfied , Please Leave a comment