Answers for "typescript convert string dd/mm/yyyy to yyyy-mm-dd"

1

typescript convert date to string 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 "typescript convert string dd/mm/yyyy to yyyy-mm-dd"

Browse Popular Code Answers by Language