I have a column in sql table with ts as format: this is the format I'm getting from database -
2020-12-07T08:02:00.000Z
I want this date to be converted in DD/MM/YYYY, 2:00 P.M
format.
When I use the code below -
<span>{{ list.incentivetype_ts | date: 'dd/MM/yyyy'}}</span>
I'm getting DD/MM/YYYY
format for date only, and when I use the code below -
<span>{{ list.incentivetype_ts | date: 'short'}}</span>
I'm getting output as -
MM/DD/YYYY, 2:00 P.M
What should we do in order to get the format as DD/MM/YYYY, 2:00 P.M
.
You can pass parameter to date pipe like this:
<p>
{{ dateString | date:'dd/MM/YYYY hh:mm a' }}
</p>
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加