format date mysql dd mm yyyy code example
Example 1: show timestamp as yyyy mm dd html angular
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');
}
Example 2: select STR_TO_DATE(date_seance1,'DD-MM-YYYY')
ORDER BY STR_TO_DATE(datestring, '%d/%m/%Y')
Example 3: show timestamp as yyyy mm dd html angular
import { DatePipe } from '@angular/common'
...
providers: [DatePipe]