Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #timestamp #yyyy #mm #dd #html #angular
ADD COMMENT
Topic
Name
4+5 =