O'Reilly logo

Learning Angular for .NET Developers by Rajesh Gunasundaram

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Date pipes

Date pipes transform input data to various date formats that are supported by a date pipe. The syntax of the date pipe is as follows:

expression | date[:format] 

Let's assume that dateData is assigned with Date.now() in a component. The implementation of the date pipe in the template is as shown in the following screenshot:

The template that implements the date pipe

The output of this template after applying various date formats is as follows:

The output of using a date pipe

A date pipe supports various formats, such as medium

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required