So dates are basically.

Don't have times attached to them. They represent a day, in a year

in a month.

And the, kind of, you can figure them in a kind of a year, month, day format so for

example, this date is 1970, January 1st and so

internally the dates are stored as the number of days since 1970 January 1st.

That particular detail is not very important but in case you're wondering

you don't know how they, how the, how R actually does calculations

based on dates.

Times are stored internally as the number of seconds.

Since 1970, January 1st.

And so, that's, again, another underlying detail.

That's not very important, but it maybe useful to know, sometimes.

So, the way dates in R, in R work, is you can take a character screen.

Like this following 1970-01-01.

And convert it into a date, using as.Date function.

That's probably the most common way that you'll start

your, begin working with dates.

And, you'll notice that if you print out this object.

You'll get something that looks like a character string.

Now it's not actually a character string but it will

print out that way because there's a special print method.

Now if I unclass the object here you'll see I get the number 0.

Remember?

Because the dates are stored internally as the

number of days since 1970, January 1st and since.

1970 January 1st. 0 days from that point.

You'll get 0. If I.

If I input January 2, 1970, then you'll see that underline is

represented as a number 1, because that's 1 day after 1970 January 1st.

If you had a.

If you had a date that was before

1970 Then, they'd be represented as negative numbers.