date time format typescript
let dateTime = new Date()
0
0
const date: Date = new Date();
Thank you!
0
0
3.75
8
#Installation
$ npm install dateformat
#Usage
var dateFormat = require("dateformat");
var now = new Date();
var today = dateFormat(now, "yyyy-mm-dd");
Thank you!
8
0
3.2
5
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]
Thank you!
5
0
Are there any code examples left?
New code examples in category TypeScript