# Javascript: TrackedChange.getChangeTime Method

> Gets the date and time when the change has been made.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TrackedChange.getChangeTime Method
- **436 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getchangetime-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getchangetime-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getchangetime-method/llms-full.txt

---

### Description

Gets the date and time when the change has been made.

### Syntax

```javascript
<void> TrackedChange.getChangeTime(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| callback | Receives the date and time when the change has been made as a unix timestamp. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `TrackedChange.getChangeTime` in a practical document-editing workflow. It gets the date and time when the change has been made.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(mainText) {
    const trackedChanges = mainText.trackedChanges;
    trackedChanges.getItem(function(trackedChange) {
        if (!trackedChange) {
            console.warn("No tracked change is available at the current input position.");
            return;
        }
    
        trackedChange.getChangeTime(
            function(result) {
                console.log("get change time result:", result);
            },
            onTxError
        );
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: TrackedChange.getChangeKind Method](https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/getchangekind-method/llms-full.txt)
- **Next:** [Javascript: TrackedChange.getHighlightColor Method](https://docs.textcontrol.com/ds-server/reference/javascript/trackedchange/gethighlightcolor-method/llms-full.txt)
