Dates and Times Flashcards
1
Q
as.Date(s) and as.POSIXct(s)
A
as.Date(s) and as.POSIXct(s) convert to the respective class; format(dt) converts to a string representation. The default string format is “2001-02-21”.
2
Q
%a, %A
A
Abbreviated and full weekday name.
3
Q
%b, %B
A
Abbreviated and full month name.
4
Q
%d
A
Day of the month (01–31).
5
Q
%H
A
Hours (00–23).
6
Q
%I
A
Hours (01–12).
7
Q
%j
A
Day of year (001–366).
8
Q
%m
A
Month (01–12).
9
Q
%M
A
Minute (00–59).
10
Q
%p
A
AM/PM indicator.
11
Q
%S
A
Second as decimal number (00–61).
12
Q
%U
A
Week (00–53); the first Sunday as day 1 of week 1.
13
Q
%w
A
Weekday (0–6, Sunday is 0).
14
Q
%W
A
Week (00–53); the first Monday as day 1 of week 1.
15
Q
%y
A
Year without century (00–99). Don’t use.