I have a dateFormat in my onLoad function.Its format is like "Fri Jan 01 00:00:00 IST 2016"
.I need to change it to dd/mm/yy format
.
My jsp field where i have to display the date
<input type="hidden" id="dateFormat" value="${per.ArrDate}">
My onLoad method
$(document).ready(function(){
alert("inside onload");
var dateFormat=$('#dateFormat').val();
alert($.datepicker.formatDate('dd/mm/yy', new Date(dateFormat)));
});
How to change to "dd/mm/yy"
format for the above input "Fri Jan 01 00:00:00 IST 2016"
.Any help will be highly appreciable.