Get date value as specified format like 10/27/2015
function convertToDateFormat(Datevalue) {
if (Datevalue != null) {
var d = Datevalue;
var n = d.getMonth();
var n1 = d.getFullYear();
var n2 = 1;
var n3 = d.getDate();
var day = +n3 + +n2;
var x = +n + +n2;
curdate = x + '/' + day + '/' + n1;
return curdate;
}
}
Comments