I'm using AngularJS for my application and the date object is $scope.ProductionDate.
From 5:00AM 2017-02-21 (Feb 21st) to 4:59AM 2017-02-22 (Feb 22nd)
I want the ProductionDate value to be 2017-02-21.
P.S. Here Feb 21st is just an example. Daily I want the same value in given timings.
Can I know how to get that?
function Ctrl($scope)
{
$scope.ProductionDate = new Date();
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app ng-controller="Ctrl">
ProductionDate: {{ProductionDate | date:'yyyy-MM-dd'}}<br/>
</div>