I am using Angular8 and want to format date and time but I have to use date pipe with same format pattern again and again as shown below <p>{{ myDate | date: 'dd MMM yyyy, h:mm a' }}</p> <p>{{ myOtherDate date: 'dd MMM yyyy, h:mm a' }}</p> <p>{{ otherVar }}</p> <p>{{ myOtherOtherDate date: 'dd MMM yyyy, h:mm a' }}</p> and same format date: 'dd MMM yyyy, h:mm a' is to be used in each and every component of my project. Is there a way where I can provide a global config in the providers of my App Module, something like this @NgModule({ providers: [ {provide: LOCAL_PIPE_DATE_PATTERN, useValue: 'ddMMyy'}, ], }) export class AppModule {} and just use the date pipe as <p>{{ myDate | date }}</p> <p>{{ myOtherDate | date }}</p> <p>{{ otherVar }}</p> <p>{{ myOtherOtherDate | date:'MMyyDD' }}</p> (If format changed) Continue reading...