Answers for "angular date time minutes and seconds format"

12

angular date pipe

// In Angular 
// Html
<p>{{myDate | date: 'dd-MM-yyyy'}}</p>
// Typescript
myDate: Date = new Date();
Posted by: Guest on July-13-2020
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');
}
Posted by: Guest on February-17-2020

Code answers related to "angular date time minutes and seconds format"

Code answers related to "Javascript"

Browse Popular Code Answers by Language