Date and Time Flashcards
1
Q
what function gets the current date?
A
Sys.Date()
2
Q
What function returns the current datetime?
A
Sys.time()
3
Q
as.Date(“X”, format = x)
A
creates a date using the symbols passed to the format argument
4
Q
%Y
A
4 - digit year (1982)
5
Q
%y
A
2-digit year (82)
6
Q
%m
A
2-digit month (01)
7
Q
%d
A
2 - digit day of the month (13)
8
Q
%A
A
weekday (Wednesday)
9
Q
%a
A
Abbreviated weekday (Wed)
10
Q
%B
A
Month (January)
11
Q
%b
A
abbreviated month (Jan)
12
Q
%H
A
hours as a decimal number (00-23)
13
Q
%I
A
hours as a decimal number (01-12)
14
Q
%M
A
minutes as a decimal number
15
Q
%S
A
seconds as a decimal number