2

I have a problem with picker-date;

  • when I choose the date from the picker and submit the form...

  • in my list-view, the date showing with this format:

  • Sun Nov 03 2019 00:00:00 GMT-0700 (Pacific Daylight Time)

  • as seen in the [screenshot][1].

  • I want to show the date like this format: 03/11/2019

how I can do it ??

list-ech.page.html:

<ion-header>
</ion-header>

<ion-content>
  <ion-grid>
<ion-row>
  <ion-col size="12" size-sm="8" offset-sm="2">
  <ion-list>
    <ion-item-sliding *ngFor="let Echeancee of loadEcheances" #slidingItem="">
      <ion-item [routerLink]="['/', 'list-echeances', Echeancee.id]" detail>
        <ion-thumbnail item-start>
          <ion-img [src]="Echeancee.chkImage"></ion-img>
        </ion-thumbnail>
        <h3>{{ Echeancee.BenefNamee }}</h3>
        <p>  {{ Echeancee.DateDuee }}</p>        
      </ion-item>
    </ion-item-sliding>
  </ion-list>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
Tony Ngo
  • 19,166
  • 4
  • 38
  • 60
theprepao026
  • 31
  • 1
  • 6
  • 1
    Possible duplicate of [Format date as dd/MM/yyyy using pipes](https://stackoverflow.com/questions/35754586/format-date-as-dd-mm-yyyy-using-pipes) – wentjun May 12 '19 at 16:18

1 Answers1

11

You can use this in your view

{{valueDate | date: 'dd/MM/yyyy'}}

Another format can be found here

Tony Ngo
  • 19,166
  • 4
  • 38
  • 60