# makedate - script and chart function

This function returns a date calculated from the year YYYY, the month MM and the day DD.

Syntax:

MakeDate(YYYY [ , MM [ , DD ] ])

**Return data type:** dual

Arguments:

MakeDate arguments

| Argument | Description |
| --- | --- |
| YYYY | The year as an integer. |
| MM | The month as an integer. If no month is stated, 1 (January)<br>is assumed. |
| DD | The day as an integer.<br><br>If no day is stated, 1 (the 1st)<br>is assumed. |

Examples and results:

Examples and results

| Example | Result |
| --- | --- |
| `makedate(2012)` | returns 2012-01-01 |
| `makedate(12)` | returns 0012-01-01 |
| `makedate(2012,12)` | returns 2012-12-01 |
| `makedate(2012,2,14)` | returns 2012-02-14 |