Hi skp,
Check this example. Now please take its reference and correct your code.
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.8/angular.min.js"></script>
<script type="text/javascript">
var app = angular.module('MyApp', []);
app.controller('MyController', function ($scope) {
$scope.DateTime = new Date().toISOString().slice(0, 19).replace('T', ' ');
});
</script>
</head>
<body>
<div ng-app="MyApp" ng-controller="MyController">
{{DateTime}}
</div>
</body>
</html>
Demo