I am currently working on storing and retrieving the date of a user request.
For creating the timestamp, I use this code:
const date = firebase.firestore.FieldValue.serverTimestamp();
This is how I fetch and display 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>
Although it functions correctly, the displayed data looks like this:
Sun Jun 30 2019 14:03:37 GMT+0300 (Eastern European Summer Time)
Is there a way to streamline the information being shown? For instance, displaying only the date and possibly the time.