Reduce data fetched/displayed from timestamp

Viewed 27

I'm trying to store and fetch the date of a user request.

I'm creating the timestamp like this:

const date = firebase.firestore.FieldValue.serverTimestamp();

The way I'm fetching/displaying the data:

<tr class="tr-content" *ngFor="let request of requests" routerLink="/admin/requests/{{ request.id }}">
  <th scope="row" class="text-center"> {{ request.id }} </th>
  <td>{{ request.name }}</td>
  <td>{{ request.company }}</td>
  <td>{{ request.type }}</td>
  <td>{{ request.budget }}</td>
  <td>{{ request.date.toDate() }}</td>
  <td class="text-center"> > </td>
</tr>

It works, but the data is being displayed like this:

Sun Jun 30 2019 14:03:37 GMT+0300 (Osteuropäische Sommerzeit)

How can I reduce the information being displayed? F.e. to only the date and maybe the time.

1 Answers
Related