Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Format Date and time into 24 hours format

I am creating a app using angularjs.Here is my code:

$scope.from = $filter('date')(new Date(), 'yyyy-MM-dd hh:mm');

It shows me output like:2016-05-15 06:30 But I want to show like:2016-05-15 18:30

like image 555
angular Avatar asked May 21 '16 14:05

angular


1 Answers

Here is the API https://docs.angularjs.org/api/ng/filter/date:

'yyyy-MM-dd HH:mm'

like image 151
adam-beck Avatar answered Oct 11 '22 15:10

adam-beck