I am the problem in defining the output of "date" . I would like that the past value for the variable is dd / mm / yyyy. The problem is who is going 2016-05-11T19 : 23: 34.399Z "
2 Answers
Just use like this
{{dt | date:'dd/MM/yyyy' }}
2 Comments
mhodges
Should be 'dd/MM/yyyy' as pointed out by @AWolf because mm = minutes
Yehudi Mikhael
I want the variable "dt" is already in the standard dd/MM/yyyy. It's because I 'm going to pass this variable as a parameter , then it must be in this format
Add a date filter and required format.
{{dt | date: 'dd/MM/yyyy'}}
http://plnkr.co/edit/DDDepd8uwpzdBlGgxpuk?p=preview
@Yehudi Mekhael, if you want dt to be in that format and pass as parameter then you can do something.
var dt = $filter('date')(dt, 'MMM dd yyyy');
But now dt is not a date object, it's a string.
3 Comments
mhodges
Should be 'dd / MM / yyyy' as pointed out by @AWolf because mm = minutes
Zohaib Ijaz
@mhodges Done! Thanks
Yehudi Mikhael
I want the variable "dt" is already in the standard dd/MM/yyyy. It's because I 'm going to pass this variable as a parameter , then it must be in this format
{{dt | date: 'dd / MM / yyyy'}}. MM in uppercase!!