# daysInMonth {#daysinmonth}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`daysInMonth(X)`

## Arguments {#arguments}

**X** is a scalar/vector of type DATE, DATEHOUR, DATETIME, TIMESTAMP or NANOTIMESTAMP.

## Details {#details}

Return the number of days in the month for each element in *X*.

**Return value**: an integer

## Examples {#examples}

```
daysInMonth(2012.06.12T12:30:00);
// output: 30

daysInMonth([2012.02.01,2013.12.05]);
// output: [29,31]
```

