Angular's date pipe that transforms a date into various formats.
Questions tagged [date-pipe]
119 questions
0
votes
1 answer
DatePipe in Angular doesn't work while converting timestamp to human date formats
I'm currently creating web application which will use REST API to GET/POST data to postgreSQL from UI using Angular CLI, node.js and TypeScript. I have few date fields that needs to be converted to Human readable format from unix timestamp, so I…

Amareesh
- 368
- 2
- 5
- 19
0
votes
2 answers
Date localization in Angular
In my Angular 8 app, I can't manage to display date fields in a localized form. I'd like to come up with something like the following:
in English : "February 18, 2020 12:15:50"
in French : "18 février 2020, 12:15:50"
I guess I should use Angular's…

Ivan dal Bosco
- 3,233
- 4
- 19
- 24
0
votes
1 answer
why date pipe is showing wrong format in chrome,chromium and opera?
i have given date format as date:'dd-MM-yyyy HH:mm:ss' but it is showing 02-03-2020 24:45:00
Hi guys, we are using angular 4. we are using angular date pipe to format date as dd-MM-yyyy HH:mm:ss. from last one week the format is not working properly…
0
votes
0 answers
How to convert "Mon May 06 2019 00:00:00 GMT+0530 (India Standard Time)" date format to mm/dd/yyyy in angular7 and angular material
How can i convert "Mon May 06 2019 00:00:00 GMT+0530 (India Standard Time)" to mm/dd/yyyy or any other format in angular 7. I'm using angular 7 and material design. Simple date pipe is not working.
"ReviewDate: new Date(2019, 4, 6)" is coming as…

Deep Shikha
- 21
- 5
0
votes
3 answers
Wrong Date format determined by Angular
I have been working with Angular 5 to show a timeline. The start and end dates are stored in DB sent from the back-end via REST.
I am getting the dates in the following format.
Start: 02-12-2019 11:26
End: 13-12-2019 13:14
As I need to convert…

Vishnu
- 65
- 1
- 3
- 10
0
votes
1 answer
how can I use datePipe in my component using angular?
Is there a way I can use the DatePipe in my angular component?
this is my code.
for (let i = 0; i < this.days.length; i++) {
this.storeStart(this.days[i], null, null, null);
}
Every weekday (monday to friday) is stored inside my days…

stan
- 348
- 1
- 3
- 13
0
votes
1 answer
Date range filter not working properly in angular
I'm using customized filter but its not working as per the requirement
if(this.startdatefilter!=undefined && this.enddatefilter!=undefined){
this.filterArray.push( { type:'startDate' ,value: "Start Date : "+this.startdatetime},{…

Priyanka
- 370
- 1
- 6
- 15
0
votes
7 answers
Angular Date pipe showing Invalid date
Angular Date pipe not showing Date properly
I am using an angular date pipe on my page list.
{{ row.createdDate }} // 2019-11-04T06:32:24.352856
{{ row.createdDate | date: 'mm-dd-yyyy' }} // 32-04-2019

Mohammad Fareed
- 1,927
- 6
- 26
- 59
0
votes
1 answer
how can I transform a long date string, not separated by any symbol, ending in several (useless ) zeroes into a dd/mm/yyyy format?
I'm receiving these kinds of values from API: "2019092300000000" as a date to be properly formated: into the "dd/mm/yyyy" format.
// The below line of code fetches the above value from API.
this.releaseDate=…

Julio Rodríguez
- 447
- 1
- 8
- 23
0
votes
0 answers
Is there a way to translate dates in a language selected using ngx-translate or with date-pipe?
I am using angular 7 and ngx-translate for internalization purpose /multilingual support ,it worked fine static html texts tags but have found nothing on how to translate dates in a dynamic stream of data.
Have tried changing the locale of the…

Saud Iqbal
- 1
- 2
0
votes
1 answer
Angular datepipe showing incorrect date/year in HTML table
I am very new in angular (I have two weeks expirience).
I am using angular 8. I'm trying to format my date value to dd-MMM-yyyy using angular datepipe. The problem I have is that the datepipe is adding ONE year to the actual date value which makes…

Linda
- 201
- 1
- 7
- 19
0
votes
1 answer
Angular: how to convert time from 00:00:01 to 8 min 49 second format?
I want to convert time from 00:00:01 (which is not a date object) to 8 min 49 second format.
I went through Angular 'date pipe' documentation also but I didn't get any solution.

Priyanka
- 370
- 1
- 6
- 15
0
votes
0 answers
How to convert IST to dd-mm-yyyy fomat
I want date in dd-mmm-yyyy format..I'm getting as {dayOfYear: 106, dayOfMonth: 16, dayOfWeek: 2, era: 1, year: 2019, …}
I tried datepipe but its throwing error that 'Unable to convert "[object Object]" into a date' for pipe 'DatePipe'.
…

Priyanka
- 370
- 1
- 6
- 15
0
votes
1 answer
Drop down populated from json data
I want my drop down to display 2017 and 2018 from my data. 2017 and 2018 repeats a lot throughout my json data file. But I want all the 2017 data to appear when selected and all the 2018 data to be displayed when selected. Currently it shows all…

L.C
- 59
- 10
0
votes
2 answers
Angular 4 ngx-bootstrap datepicker-how to transform DATE-FORMAT from DD-MM-YYYY to YYYY-MM-DD while clicks on Submit
Here i am using ngx-bootstrap datepicker with DatePipe
how to transform DATE-FORMAT from DD-MM-YYYY to YYYY-MM-DD while clicks on Submit
*My Template - component.html

D.Sridhar
- 139
- 1
- 4
- 11