<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/firestore](./firestore.md) &gt; [/](./firestore_.md) &gt; [Timestamp](./firestore_.timestamp.md) &gt; [fromDate](./firestore_.timestamp.fromdate.md)

## Timestamp.fromDate() method

Creates a new timestamp from the given date.

<b>Signature:</b>

```typescript
static fromDate(date: Date): Timestamp;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  date | Date | The date to initialize the <code>Timestamp</code> from. |

<b>Returns:</b>

[Timestamp](./firestore_.timestamp.md)

A new `Timestamp` representing the same point in time as the given date.

