How can i change the current date to this format(DD/MM/YYYY) using moment.js?
I have tried below code.
$scope.SearchDate = moment(new Date(), \"DD/MM/YYY
You can use this
moment().format("DD/MM/YYYY");
However, this returns a date string in the specified format for today, not a moment date object. Doing the following will make it a moment date object in the format you want.
var someDateString = moment().format("DD/MM/YYYY");
var someDate = moment(someDateString, "DD/MM/YYYY");