The fmt_date() function

Use exibble to create a gt table. Keep only the date and time columns. Format the date column to have dates formatted with the "month_day_year" date style.

exibble |>
  dplyr::select(date, time) |>
  gt() |>
  fmt_date(
    columns = date,
    date_style = "month_day_year"
  )
date time
January 15, 2015 13:35
February 15, 2015 14:40
March 15, 2015 15:45
April 15, 2015 16:50
May 15, 2015 17:55
June 15, 2015 NA
NA 19:10
August 15, 2015 20:20

Use exibble to create a gt table. Keep only the date and time columns. Format the date column to have mixed date formats (dates after April will be different than the others because of the expressions used in the rows argument).

exibble |>
  dplyr::select(date, time) |>
  gt() |>
  fmt_date(
    columns = date,
    rows = as.Date(date) > as.Date("2015-04-01"),
    date_style = "m_day_year"
  ) |>
  fmt_date(
    columns = date,
    rows = as.Date(date) <= as.Date("2015-04-01"),
    date_style = "day_m_year"
  )
date time
15 Jan 2015 13:35
15 Feb 2015 14:40
15 Mar 2015 15:45
Apr 15, 2015 16:50
May 15, 2015 17:55
Jun 15, 2015 NA
NA 19:10
Aug 15, 2015 20:20

Use exibble to create another gt table, this time only with the date column. Format the date column to use the "yMMMEd" date style (which is one of the ‘flexible’ styles). Also, set the locale to "nl" to get the dates in Dutch.

exibble |>
  dplyr::select(date) |>
  gt() |>
  fmt_date(
    columns = date,
    date_style = "yMMMEd",
    locale = "nl"
  )
date
do 15 jan. 2015
zo 15 feb. 2015
zo 15 mrt. 2015
wo 15 apr. 2015
vr 15 mei 2015
ma 15 jun. 2015
NA
za 15 aug. 2015