Format Date Time in Angular 2
Use date pipe:
{{dte | date}}
You can choose a predefined format (e.g. shortDate
):
{{dte | date:'mediumDate'}}
Or specify your custom format:
{{dte | date:'MM dd, yyyy'}}
just use the pipe filter with ur {{dte}}...
just use {{dte |date:'MM/dd/yyyy @ h:mma'}}
it will give u your desired output :)