---
url: /process-functions/datasource-filelastmodified.md
description: Returns when a file was last changed.
---

# datasource.fileLastModified

Returns when a file was last changed.

```js
datasource.fileLastModified(fileName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `fileName` | `string` | The path of the file. |

## Returns

Milliseconds since 1 January 1970 (UTC), or `0` when the file doesn't exist or the path is invalid.

## Examples

```js
const lastModified = new Date(datasource.fileLastModified("my_file.txt"));
```
