Format input date-time values that are character-based and expressed
according to the ISO 8601 date-time format (YYYY-MM-DD HH:MM:SS
). Once the
appropriate data cells are targeted with columns
(and, optionally, rows
),
we can simply apply preset date and time styles to format the date-time
values. The following date styles are available for simpler formatting of the
date portion (all using the input date of 2000-02-29
in the example output
dates):
iso: 2000-02-29
wday_month_day_year: Tuesday, February 29, 2000
wd_m_day_year: Tue, Feb 29, 2000
wday_day_month_year: Tuesday 29 February 2000
month_day_year: February 29, 2000
m_day_year: Feb 29, 2000
day_m_year: 29 Feb 2000
day_month_year: 29 February 2000
day_month: 29 February
year: 2000
month: February
day: 29
year.mn.day: 2000/02/29
y.mn.day: 0/02/29
The following time styles are available for simpler formatting of the time
portion (all using the input time of 14:35:00
in the example output times):
hms: 14:35:00
hm: 14:35
hms_p: 2:35:00 PM
hm_p: 2:35 PM
h_p: 2 PM
We can use the info_date_style()
and info_time_style()
functions as
useful references for all of the possible inputs to date_style
and
time_style
.