Index: Date a document was processed

var formatDateToStr = function(pDate){
	var dayOn2Digits = pDate.getDate() < 10 ? "0" + pDate.getDate() : pDate.getDate();
	var monthOn2Digits = (pDate.getMonth() + 1) < 10 ? "0" + (pDate.getMonth() + 1) : (pDate.getMonth() + 1);
	var hourOn2Digits = pDate.getHours() < 10 ? "0" + pDate.getHours() : pDate.getHours();
	var minOn2Digits = pDate.getMinutes() < 10 ? "0" + pDate.getMinutes() : pDate.getMinutes();
	var secondOn2Digits = pDate.getSeconds() < 10 ? "0" + pDate.getSeconds() : pDate.getSeconds();
	return dayOn2Digits  + "/" + monthOn2Digits + "/" + pDate.getFullYear()+ " "+ hourOn2Digits + ":"+ minOn2Digits + ":" +secondOn2Digits;
}


var ws = new JSE_WebService("127.0.0.1", "http", 8090);
var res = ws.send("/ws/document/"+INTERNAL_DOCUMENT_ID, "GET", {"Authorization" : "Bearer "+ CAPTURE_WS_TOKEN});
return formatDateToStr(new Date(JSON.parse(res.StringResponse).creation));