The largest Interview Solution Library on the web



Warning: include(../../menu/leftMenu/angularjs-datetimeformat.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-datetimeformat.php on line 36

Warning: include(../../menu/leftMenu/angularjs-datetimeformat.php) [function.include]: failed to open stream: No such file or directory in /home/javatech/public_html/question/angularjsexample/angularjs-datetimeformat.php on line 36

Warning: include() [function.include]: Failed opening '../../menu/leftMenu/angularjs-datetimeformat.php' for inclusion (include_path='.:/opt/alt/php53/usr/share/pear:/opt/alt/php53/usr/share/php') in /home/javatech/public_html/question/angularjsexample/angularjs-datetimeformat.php on line 36
« 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