# Creation of date and time data for given years, months, and days¶

```# Here we create the first days of all months in the year 2000:
# By default the time is noon
ISOdate(2000,1:12,1)
```
``` [1] "2000-01-01 12:00:00 GMT" "2000-02-01 12:00:00 GMT"
[3] "2000-03-01 12:00:00 GMT" "2000-04-01 12:00:00 GMT"
[5] "2000-05-01 12:00:00 GMT" "2000-06-01 12:00:00 GMT"
[7] "2000-07-01 12:00:00 GMT" "2000-08-01 12:00:00 GMT"
[9] "2000-09-01 12:00:00 GMT" "2000-10-01 12:00:00 GMT"
[11] "2000-11-01 12:00:00 GMT" "2000-12-01 12:00:00 GMT"
```
```# To get the start of the date we have to set the hour to midnight:
ISOdate(2000,1:12,1,hour=0)
```
``` [1] "2000-01-01 GMT" "2000-02-01 GMT" "2000-03-01 GMT" "2000-04-01 GMT"
[5] "2000-05-01 GMT" "2000-06-01 GMT" "2000-07-01 GMT" "2000-08-01 GMT"
[9] "2000-09-01 GMT" "2000-10-01 GMT" "2000-11-01 GMT" "2000-12-01 GMT"
```
```# We can of course also create a sequence of days:
ISOdate(2000,2,1:29,hour=0)
```
``` [1] "2000-02-01 GMT" "2000-02-02 GMT" "2000-02-03 GMT" "2000-02-04 GMT"
[5] "2000-02-05 GMT" "2000-02-06 GMT" "2000-02-07 GMT" "2000-02-08 GMT"
[9] "2000-02-09 GMT" "2000-02-10 GMT" "2000-02-11 GMT" "2000-02-12 GMT"
[13] "2000-02-13 GMT" "2000-02-14 GMT" "2000-02-15 GMT" "2000-02-16 GMT"
[17] "2000-02-17 GMT" "2000-02-18 GMT" "2000-02-19 GMT" "2000-02-20 GMT"
[21] "2000-02-21 GMT" "2000-02-22 GMT" "2000-02-23 GMT" "2000-02-24 GMT"
[25] "2000-02-25 GMT" "2000-02-26 GMT" "2000-02-27 GMT" "2000-02-28 GMT"
[29] "2000-02-29 GMT"
```
```# 'Impossible' dates result in NA:
ISOdate(2000,2,29:31,hour=0)
```
```[1] "2000-02-29 GMT" NA               NA
```