The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »
dd/MM/yyyy format
{{CurrentDate | date:'dd/MM/yyyy'}}

dd, MMMM yyyy format
{{CurrentDate | date:'dd, MMMM yyyy'}}

24 Hour time
{{CurrentDate | date:'HH:mm:ss'}}

12 Hour time
{{CurrentDate | date:'hh:mm:ss a'}}
<html>
<head>
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
</style>
</head>
<body>
<script type="text/javascript">
var app = angular.module('MyApp', [])
app.controller('MyController', function ($scope) {
$scope.CurrentDate = new Date();
});
</script>
<div ng-app="MyApp" ng-controller="MyController">
<u>dd/MM/yyyy format</u><br />
<span>{{CurrentDate | date:'dd/MM/yyyy'}}</span>
<br />
<br />
<u>dd, MMMM yyyy format</u><br />
<span>{{CurrentDate | date:'dd, MMMM yyyy'}}</span>
<br />
<br />
<u>24 Hour time</u><br />
<span>{{CurrentDate | date:'HH:mm:ss'}}</span>
<br />
<br />
<u>12 Hour time</u><br />
<span>{{CurrentDate | date:'hh:mm:ss a'}}</span>
</div>
</body>
</html>
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com