Angular's date pipe that transforms a date into various formats.
Questions tagged [date-pipe]
119 questions
0
votes
1 answer
Issue with date pipe in angular for KHMER language
{{
value | date: 'E, dd/MM/yyyy':undefined:languageCode
}}
I have a scenario in which I need to pass the locale code corresponding to Cambodia's KHMER language. I tried multiple locale codes but they didn't…
0
votes
2 answers
Angular DatePipe Output - show UTC instead of GMT
Is there a way I can use Angular DatePipe to specify a format that shows "UTC" instead of "GMT".
Example Format:
{{currentDate | date:'dd/MM/yyyy hh:mm:ss a (O)'}}
Output: 17/09/2021 10:50:32 AM (GMT-4)
Is there a way I can get the following output…

user734119
- 103
- 1
- 8
0
votes
1 answer
How to use angular DatePipe with 0 value?
I've been try to use angular DatePipe to convert number to date, but I think there is something wrong. I don't know where ("maybe some bug").
For an example in my typescript:
const ONE_SECOND = 1000
setInterval(() => {
this.dateInTime +=…

Titus Sutio Fanpula
- 3,467
- 4
- 14
- 33
0
votes
1 answer
Formating date for different languages using moment.js or date pipe | angular 9
I have a date field from backend response where the format changes as we manually change the browser language.
For example if the browser language is french my date from response from backend would be something like this 23 juin 2021 or 30 déc.…

dev_101
- 321
- 4
- 14
0
votes
3 answers
Angular DatePipe show new Date data from API
I think this question has bean asked many time before. I have implemented DatePipe in my angular project, formating is correct only it shows the current Date and this is not what i want and is not the date that i receive from my rest services. I get…

user9302067
- 1
- 5
0
votes
1 answer
How Do I use Angular Date Pipe in material date picker?
I am new to Angular, and I want to format my input value for my date picker, but I cannot figure out how. I want to do something like this:

Danny
- 77
- 1
- 8
0
votes
1 answer
translateService.onLangChange.subscribe does not trigger when lang changes in OnInit
So I had translateService.onLangChange.subscribe in a component where it worked fine but a made a separate service were it would subscribe to langChange and set a localeDate for me. But when I change the lang it doesnt register it and does…

C0mpl3x
- 480
- 4
- 21
0
votes
2 answers
Angular - DatePipe not recognizing date format
In my Angular application, I have to display the date in 'MM/dd/yyyy' format.
Web API is returning a date in "2020-12-01T00:00:00" format.
When I use the below line of code, DatePipe not recognizing the date but if I manually modify the date to…

Tech Learner
- 1,227
- 6
- 24
- 59
0
votes
1 answer
Extend predefined Angular date pipe formats with only month with year localized format (e.g 05/2020 for 'en' or 05.2020 in 'de' locale)
I need to extend the list of predefined angular date pipe formats (you can see it here) with format that consists of only month with year, e.g 05/2020 for 'en' or 05.2020 for 'de', that have to be localized. Is there any correct way to do this? I…

divinen
- 81
- 10
0
votes
1 answer
Date Pipe Angular it is not able to show only Month and Year it shows date, month and year
I am using bootstrap input date and saving a new Date from dialog box.
But when I want to show I want only to show the month and year.
I have added the pipe to show month and year but it shows month, year and date.

TheCoderGuy
- 771
- 6
- 24
- 51
0
votes
0 answers
How to format date pipe correctly from UTC to local datetime in Angular 9?
I have the following code to show the provided date and time:
{{ product.availableFromUtc | date: 'mediumDate' }} {{ product.availableFromUtc | date: 'shortTime' }}
The DateTime is stored as UTC in the database (2020-08-25 14:30:29.6220000).
It is…

A. Gh
- 631
- 9
- 24
0
votes
1 answer
Applying Date Pipe on Dynamic Angular Table
My "data" object looks like
[
{"id": "abc001", "lastInspectionDate": "2019-09-26T00:00:00.000Z", "nextInspectionDate": "2021-09-26T00:00:00.000Z"},
{"id": "abc002", "lastInspectionDate":"2018-08-25T00:00:00.000Z", "nextInspectionDate":…

hiruzxn
- 60
- 1
- 8
0
votes
1 answer
Angular 9 timezone DatePipe
I need to display date in specific timezone.
In my app.module I provide locale_id in french and date is display in good format DD/MM/YYYY.
But I get the date time in UTC Format, and I want to display date in user's timezone.
I work on french PC. If…

Alphablony
- 23
- 1
- 4
0
votes
1 answer
How to convert a value to date format like yyyy-mm-dd - angular
I'm trying to convert a value to yyyy-MM-dd format. Basically for 06th july 2020 I'm getting date value like this '20200706'. Now i want to convert this value to 2020-07-06.
Currently i'm trying to convert like this, but this is not giving correct…

Roy
- 880
- 7
- 21
- 39
0
votes
1 answer
How to convert date time in to required date format in angular date pipe?
I am using angular 8. I want to convert this date time format ("17/06/2020 10:01:09") in to this format ("17/06/2020"). But i can't resolve this issue. I am getting this error "InvalidPipeArgument: 'Unable to convert "17/06/2020 10:01:09" into a…

monir tuhin
- 441
- 3
- 13
- 27