Answers for "angular date to string with format"

2

ts change date format

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');
}
Posted by: Guest on May-04-2020
2

show timestamp as yyyy mm dd html angular

{{date  | date:'yyyy-MM-dd'}}
Posted by: Guest on February-17-2020

Code answers related to "angular date to string with format"

Browse Popular Code Answers by Language