#' Extract dates from long date-time string
#'
#' Legacy function for standardising dates autogenerated by SurveyCTO
#'
#' @param x Date and time field that is generated by SurveyCTO
#'
#' @return Date in the format YYYY-MM-DD
#' @export
#'
#' @examples mutate(dataframe, mydate = date_unifier(SubmissionDate))
date_unifier <- function(x) {
as.Date(str_extract(x, "^[[:alpha:]]{3} \\d+, \\d{4}"), format = "%B %d, %Y")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.