1

Trying to show time in table but it shows me time in this format { "ticks": 690680000000, "days": 0, "hours": 19, "milliseconds": 0, "minutes": 11, "seconds": 8, "totalDays": 0.7993981481481481, "totalHours": 19.185555555555556, "totalMilliseconds": 69068000, "totalMinutes": 1151.1333333333334, "totalSeconds": 69068 } while i want it to be displayed in this format "10:15:20" Html

    <ng-container matColumnDef="debutJour">
        <th mat-header-cell *matHeaderCellDef mat-sort-header>
          {{'::DebutJour' | abpLocalization}}
        </th>
        <td mat-cell *matCellDef="let element">
          {{ element.debutJour|json }}
        </td>
      </ng-container>
      <ng-container matColumnDef="duree">
        <th mat-header-cell *matHeaderCellDef mat-sort-header>
          {{'::Duree' | abpLocalization}}
        </th>
        <td mat-cell *matCellDef="let element">
          {{ element.duree|json }}
        </td>
      </ng-container>
Jazb
  • 4,332
  • 6
  • 29
  • 34
SEL_M
  • 11
  • 3
  • 1
    I'm guessing you have a C# back-end, and might need to do formatting before it reaches the front-end. If you have access, you can write code similar to that in the answer of the following: https://stackoverflow.com/questions/44788305/c-sharp-convert-datetime-object-to-iso-8601-string Or, if you don't have access, ask the team or individual to provide the date in ISO-8601 format, and parse it as a Date object. At that point, you can format it any way you like/need. – ryanwebjackson Jan 05 '21 at 02:57

0 Answers0