How to get the previous date in angular? Try this let dte = new Date(); dte.setDate(dte.getDate() - 2); console.log(dte.toString());