| dt2_format_datetime | R Documentation |
Use DataTables' built-in DataTable.render.datetime to transform
date/time strings for display (and preserve sortability).
dt2_format_datetime(
options = list(),
col_specs,
from = NULL,
to = "DD/MM/YYYY",
locale = NULL,
def = NULL
)
options |
List of options (returned with |
col_specs |
Column names or 1-based indices. |
from |
Input format (e.g., |
to |
Output format (e.g., |
locale |
Optional locale (e.g., |
def |
Optional default output if input is invalid. |
Modified options.
opts <- list(columns = c("when", "val"))
opts <- dt2_format_datetime(opts, "when", from = "YYYY-MM-DD",
to = "DD/MM/YYYY", locale = "pt-BR")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.