show timestamp as yyyy mm dd html angular
snippet in html

show timestamp as yyyy mm dd html angular

user7456

{{date  | date:'yyyy-MM-dd'}}

show timestamp as yyyy mm dd html angular

user3841

import { DatePipe } from '@angular/common'
...
constructor(public datepipe: DatePipe){}
...
myFunction(){
 this.date=new Date();
 let latest_date =this.datepipe.transform(this.date, 'yyyy-MM-dd');
}

show timestamp as yyyy mm dd html angular

user9124

import { DatePipe } from '@angular/common'
...
providers: [DatePipe]