Answers for "date time format typescript"

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
1

date format in typescript

#Installation
$ npm install dateformat

#Usage
var dateFormat = require("dateformat");
var now = new Date();
var today = dateFormat(now, "yyyy-mm-dd");
Posted by: Guest on May-03-2021
1

types date typescript

const date: Date = new Date();
Posted by: Guest on January-02-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language