> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/task/_setduedate.md).

# \_setDueDate

Set the Due Date for a Task.

### Parameters

#### id

The ID of the Task.

#### due\_date

The date which the Task should be completed for by the latest. The date/time format should be as follows: yyyy-mm-dd hh:mm:ss.

### Example

```
FM_api('Task_setDueDate', ['id' => '123', 'due_date' => '2018-10-20 10:00:00']);
```

### Result

#### On Success

```
{'ok':1}
```
