Answers for "convert date to format typescript"

2

string to date in typescript

let dateString = '1968-11-16T00:00:00' 
let newDate = new Date(dateString);
Posted by: Guest on April-23-2021
1

date time format typescript

import { DatePipe } from '@angular/common'
...
constructor(public datepipe: DatePipe){}
...
myFunction() {
 this.date=new Date();
 const start = this.datepipe.transform(this.date, 'yyyyMMdd\'T\'HHmmss.SSSZ');
}
....
in app.module.com
import { DatePipe } from '@angular/common'
...
providers: [DatePipe]
Posted by: Guest on January-07-2021
0

string to date in typescript

{{dateString |  date:'MM/dd/yyyy'}}
Posted by: Guest on April-23-2021

Code answers related to "convert date to format typescript"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language