Answers for "types of date format for date function"

PHP
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

date format example

Pattern                           Result
 ----------------                  -------
 DateFormat.yMd()                 -> 7/10/1996
 DateFormat('yMd')                -> 7/10/1996
 DateFormat.yMMMMd('en_US')       -> July 10, 1996
 DateFormat.jm()                  -> 5:08 PM
 DateFormat.yMd().add_jm()        -> 7/10/1996 5:08 PM
 DateFormat.Hm()                  -> 17:08 // force 24 hour time
Posted by: Guest on June-14-2021

Browse Popular Code Answers by Language