Answers for "format(new date() 'yyyy-mm-dd') typescript options instead of type"

3

ts date format dd/mm/yyyy

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 February-17-2020

Code answers related to "format(new date() 'yyyy-mm-dd') typescript options instead of type"

Browse Popular Code Answers by Language