dttm_to_dt | R Documentation |
dttm_to_dt()
converts POSIXt
objects to Date
objects when there is no
additional information contained in the POSIXt
format (i.e. there is no
sub-daily information).
dttm_to_dt(.x, force = c("none", "dt", "dttm"))
.x |
A |
force |
Whether to force conversion to |
Specifically, dttm_to_dt
checks whether all sub-daily information is the
same for each value in the datetime vector. If so, no additional information
is gained by using a POSIXt
format over the simpler Date
format, and
the data is coerced.
If the input is scalar (i.e. has length 1L
), then no conversion is
attempted
Either a POSIXct
vector or a Date
vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.