Guess possible date-times formats from a character vector

guess_formats(x, orders, locale = Sys.getlocale("LC_TIME"),
  preproc_wday = TRUE, print_matches = FALSE)

Arguments

x

input vector of date-times

orders

format orders to look for. See examples.

locale

locale to use, default to the current locale

preproc_wday

whether to preprocess week days names. Internal optimization used by ymd_hms family of functions. If TRUE, weekdays are substituted with this format explicitly.

print_matches

for development purpose mainly. If TRUE prints a matrix of matched templates.

Value

a vector of matched formats

Examples

x <- c('February 20th 1973', "february 14, 2004", "Sunday, May 1, 2000", "Sunday, May 1, 2000", "february 14, 04", 'Feb 20th 73', "January 5 1999 at 7pm", "jan 3 2010", "Jan 1, 1999", "jan 3 10", "01 3 2010", "1 3 10", '1 13 89', "5/27/1979", "12/31/99", "DOB:12/11/00", "-----------", 'Thu, 1 July 2004 22:30:00', 'Thu, 1st of July 2004 at 22:30:00', 'Thu, 1July 2004 at 22:30:00', 'Thu, 1July2004 22:30:00', 'Thu, 1July04 22:30:00', "21 Aug 2011, 11:15:34 pm", "-----------", "1979-05-27 05:00:59", "1979-05-27", "-----------", "3 jan 2000", "17 april 85", "27/5/1979", '20 01 89', '00/13/10', "-------", "14 12 00", "03:23:22 pm") guess_formats(x, "BdY")
#> BdY BdY BdY BdY #> "%B %dth %Y" "%B %d, %Y" "%A, %B %d, %Y" "%A, %B %d, %Y" #> BdY BdY BdY BdY #> "%B %dth %Y" "%B %d, %Y" "Sunday, %B %d, %Y" "Sunday, %B %d, %Y"
guess_formats(x, "Bdy")
#> Bdy Bdy Bdy Bdy #> "%B %dth %Y" "%B %d, %Y" "%A, %B %d, %Y" "%A, %B %d, %Y" #> Bdy Bdy Bdy Bdy #> "%B %d, %y" "%B %dth %Y" "%B %d, %Y" "Sunday, %B %d, %Y" #> Bdy Bdy #> "Sunday, %B %d, %Y" "%B %d, %y"
## m also matches b and B; y also matches Y guess_formats(x, "mdy", print_matches = TRUE)
#> mdy #> [1,] "February 20th 1973" "%B %dth %Y" #> [2,] "february 14, 2004" "%B %d, %Y" #> [3,] "Sunday, May 1, 2000" "Sunday, %b %d, %Y" #> [4,] "Sunday, May 1, 2000" "Sunday, %b %d, %Y" #> [5,] "february 14, 04" "%B %d, %y" #> [6,] "Feb 20th 73" "%b %dth %y" #> [7,] "January 5 1999 at 7pm" "" #> [8,] "jan 3 2010" "%b %d %Y" #> [9,] "Jan 1, 1999" "%b %d, %Y" #> [10,] "jan 3 10" "%b %d %y" #> [11,] "01 3 2010" "%m %d %Y" #> [12,] "1 3 10" "%m %d %y" #> [13,] "1 13 89" "%m %d %y" #> [14,] "5/27/1979" "%m/%d/%Y" #> [15,] "12/31/99" "%m/%d/%y" #> [16,] "DOB:12/11/00" "DOB:%m/%d/%y" #> [17,] "-----------" "" #> [18,] "Thu, 1 July 2004 22:30:00" "" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "" #> [20,] "Thu, 1July 2004 at 22:30:00" "" #> [21,] "Thu, 1July2004 22:30:00" "" #> [22,] "Thu, 1July04 22:30:00" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "" #> [24,] "-----------" "" #> [25,] "1979-05-27 05:00:59" "" #> [26,] "1979-05-27" "" #> [27,] "-----------" "" #> [28,] "3 jan 2000" "" #> [29,] "17 april 85" "" #> [30,] "27/5/1979" "" #> [31,] "20 01 89" "" #> [32,] "00/13/10" "" #> [33,] "-------" "" #> [34,] "14 12 00" "" #> [35,] "03:23:22 pm" "%m:%d:%y pm"
#> mdy mdy mdy mdy #> "%B %dth %Y" "%B %d, %Y" "%A, %b %d, %Y" "%A, %b %d, %Y" #> mdy mdy mdy mdy #> "%B %d, %y" "%b %dth %y" "%b %d %Y" "%b %d, %Y" #> mdy mdy mdy mdy #> "%b %d %y" "%m %d %Y" "%m %d %y" "%m %d %y" #> mdy mdy mdy mdy #> "%m/%d/%Y" "%m/%d/%y" "DOB:%m/%d/%y" "%m:%d:%y pm" #> mdy mdy mdy mdy #> "%B %dth %Y" "%B %d, %Y" "Sunday, %b %d, %Y" "Sunday, %b %d, %Y" #> mdy mdy mdy mdy #> "%B %d, %y" "%b %dth %y" "%b %d %Y" "%b %d, %Y" #> mdy mdy mdy mdy #> "%b %d %y" "%m %d %Y" "%m %d %y" "%m %d %y" #> mdy mdy mdy mdy #> "%m/%d/%Y" "%m/%d/%y" "DOB:%m/%d/%y" "%m:%d:%y pm"
## T also matches IMSp order guess_formats(x, "T", print_matches = TRUE)
#> HMSOp T #> [1,] "February 20th 1973" "" "" #> [2,] "february 14, 2004" "" "february %H, %M%S" #> [3,] "Sunday, May 1, 2000" "" "" #> [4,] "Sunday, May 1, 2000" "" "" #> [5,] "february 14, 04" "" "" #> [6,] "Feb 20th 73" "" "" #> [7,] "January 5 1999 at 7pm" "" "" #> [8,] "jan 3 2010" "" "" #> [9,] "Jan 1, 1999" "" "" #> [10,] "jan 3 10" "" "" #> [11,] "01 3 2010" "" "" #> [12,] "1 3 10" "" "%H %M %S" #> [13,] "1 13 89" "" "" #> [14,] "5/27/1979" "" "" #> [15,] "12/31/99" "" "" #> [16,] "DOB:12/11/00" "" "DOB:%H/%M/%S" #> [17,] "-----------" "" "" #> [18,] "Thu, 1 July 2004 22:30:00" "" "" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "" "" #> [20,] "Thu, 1July 2004 at 22:30:00" "" "" #> [21,] "Thu, 1July2004 22:30:00" "" "" #> [22,] "Thu, 1July04 22:30:00" "" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "" "" #> [24,] "-----------" "" "" #> [25,] "1979-05-27 05:00:59" "" "" #> [26,] "1979-05-27" "" "" #> [27,] "-----------" "" "" #> [28,] "3 jan 2000" "" "" #> [29,] "17 april 85" "" "" #> [30,] "27/5/1979" "" "" #> [31,] "20 01 89" "" "" #> [32,] "00/13/10" "" "%H/%M/%S" #> [33,] "-------" "" "" #> [34,] "14 12 00" "" "%H %M %S" #> [35,] "03:23:22 pm" "%H:%M:%S %Op" "%I:%M:%S %p"
#> HMSOp T T #> "%H:%M:%S %Op" "february %H, %M%S" "%H %M %S" #> T T T #> "DOB:%H/%M/%S" "%H/%M/%S" "%H %M %S" #> T #> "%I:%M:%S %p"
## b and B are equivalent and match, both, abreviated and full names guess_formats(x, c("mdY", "BdY", "Bdy", "bdY", "bdy"), print_matches = TRUE)
#> mdY #> [1,] "February 20th 1973" "%B %dth %Y" #> [2,] "february 14, 2004" "%B %d, %Y" #> [3,] "Sunday, May 1, 2000" "Sunday, %b %d, %Y" #> [4,] "Sunday, May 1, 2000" "Sunday, %b %d, %Y" #> [5,] "february 14, 04" "" #> [6,] "Feb 20th 73" "" #> [7,] "January 5 1999 at 7pm" "" #> [8,] "jan 3 2010" "%b %d %Y" #> [9,] "Jan 1, 1999" "%b %d, %Y" #> [10,] "jan 3 10" "" #> [11,] "01 3 2010" "%m %d %Y" #> [12,] "1 3 10" "" #> [13,] "1 13 89" "" #> [14,] "5/27/1979" "%m/%d/%Y" #> [15,] "12/31/99" "" #> [16,] "DOB:12/11/00" "" #> [17,] "-----------" "" #> [18,] "Thu, 1 July 2004 22:30:00" "" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "" #> [20,] "Thu, 1July 2004 at 22:30:00" "" #> [21,] "Thu, 1July2004 22:30:00" "" #> [22,] "Thu, 1July04 22:30:00" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "" #> [24,] "-----------" "" #> [25,] "1979-05-27 05:00:59" "" #> [26,] "1979-05-27" "" #> [27,] "-----------" "" #> [28,] "3 jan 2000" "" #> [29,] "17 april 85" "" #> [30,] "27/5/1979" "" #> [31,] "20 01 89" "" #> [32,] "00/13/10" "" #> [33,] "-------" "" #> [34,] "14 12 00" "" #> [35,] "03:23:22 pm" "" #> BdY Bdy bdY #> [1,] "%B %dth %Y" "%B %dth %Y" "%B %dth %Y" #> [2,] "%B %d, %Y" "%B %d, %Y" "%B %d, %Y" #> [3,] "Sunday, %B %d, %Y" "Sunday, %B %d, %Y" "Sunday, %b %d, %Y" #> [4,] "Sunday, %B %d, %Y" "Sunday, %B %d, %Y" "Sunday, %b %d, %Y" #> [5,] "" "%B %d, %y" "" #> [6,] "" "" "" #> [7,] "" "" "" #> [8,] "" "" "%b %d %Y" #> [9,] "" "" "%b %d, %Y" #> [10,] "" "" "" #> [11,] "" "" "" #> [12,] "" "" "" #> [13,] "" "" "" #> [14,] "" "" "" #> [15,] "" "" "" #> [16,] "" "" "" #> [17,] "" "" "" #> [18,] "" "" "" #> [19,] "" "" "" #> [20,] "" "" "" #> [21,] "" "" "" #> [22,] "" "" "" #> [23,] "" "" "" #> [24,] "" "" "" #> [25,] "" "" "" #> [26,] "" "" "" #> [27,] "" "" "" #> [28,] "" "" "" #> [29,] "" "" "" #> [30,] "" "" "" #> [31,] "" "" "" #> [32,] "" "" "" #> [33,] "" "" "" #> [34,] "" "" "" #> [35,] "" "" "" #> bdy #> [1,] "%B %dth %Y" #> [2,] "%B %d, %Y" #> [3,] "Sunday, %b %d, %Y" #> [4,] "Sunday, %b %d, %Y" #> [5,] "%B %d, %y" #> [6,] "%b %dth %y" #> [7,] "" #> [8,] "%b %d %Y" #> [9,] "%b %d, %Y" #> [10,] "%b %d %y" #> [11,] "" #> [12,] "" #> [13,] "" #> [14,] "" #> [15,] "" #> [16,] "" #> [17,] "" #> [18,] "" #> [19,] "" #> [20,] "" #> [21,] "" #> [22,] "" #> [23,] "" #> [24,] "" #> [25,] "" #> [26,] "" #> [27,] "" #> [28,] "" #> [29,] "" #> [30,] "" #> [31,] "" #> [32,] "" #> [33,] "" #> [34,] "" #> [35,] ""
#> mdY mdY mdY mdY #> "%B %dth %Y" "%B %d, %Y" "%A, %b %d, %Y" "%A, %b %d, %Y" #> mdY mdY mdY mdY #> "%b %d %Y" "%b %d, %Y" "%m %d %Y" "%m/%d/%Y" #> BdY BdY BdY BdY #> "%B %dth %Y" "%B %d, %Y" "%A, %B %d, %Y" "%A, %B %d, %Y" #> Bdy Bdy Bdy Bdy #> "%B %dth %Y" "%B %d, %Y" "%A, %B %d, %Y" "%A, %B %d, %Y" #> Bdy bdY bdY bdY #> "%B %d, %y" "%B %dth %Y" "%B %d, %Y" "%A, %b %d, %Y" #> bdY bdY bdY bdy #> "%A, %b %d, %Y" "%b %d %Y" "%b %d, %Y" "%B %dth %Y" #> bdy bdy bdy bdy #> "%B %d, %Y" "%A, %b %d, %Y" "%A, %b %d, %Y" "%B %d, %y" #> bdy bdy bdy bdy #> "%b %dth %y" "%b %d %Y" "%b %d, %Y" "%b %d %y" #> mdY mdY mdY mdY #> "%B %dth %Y" "%B %d, %Y" "Sunday, %b %d, %Y" "Sunday, %b %d, %Y" #> mdY mdY mdY mdY #> "%b %d %Y" "%b %d, %Y" "%m %d %Y" "%m/%d/%Y" #> BdY BdY BdY BdY #> "%B %dth %Y" "%B %d, %Y" "Sunday, %B %d, %Y" "Sunday, %B %d, %Y" #> Bdy Bdy Bdy Bdy #> "%B %dth %Y" "%B %d, %Y" "Sunday, %B %d, %Y" "Sunday, %B %d, %Y" #> Bdy bdY bdY bdY #> "%B %d, %y" "%B %dth %Y" "%B %d, %Y" "Sunday, %b %d, %Y" #> bdY bdY bdY bdy #> "Sunday, %b %d, %Y" "%b %d %Y" "%b %d, %Y" "%B %dth %Y" #> bdy bdy bdy bdy #> "%B %d, %Y" "Sunday, %b %d, %Y" "Sunday, %b %d, %Y" "%B %d, %y" #> bdy bdy bdy bdy #> "%b %dth %y" "%b %d %Y" "%b %d, %Y" "%b %d %y"
guess_formats(x, c("dmy", "dbY", "dBy", "dBY"), print_matches = TRUE)
#> dOmy dOmY #> [1,] "February 20th 1973" "" "" #> [2,] "february 14, 2004" "" "" #> [3,] "Sunday, May 1, 2000" "" "" #> [4,] "Sunday, May 1, 2000" "" "" #> [5,] "february 14, 04" "" "" #> [6,] "Feb 20th 73" "" "" #> [7,] "January 5 1999 at 7pm" "" "" #> [8,] "jan 3 2010" "" "" #> [9,] "Jan 1, 1999" "" "" #> [10,] "jan 3 10" "" "" #> [11,] "01 3 2010" "%d %Om %Y" "%d %Om %Y" #> [12,] "1 3 10" "%d %Om %y" "" #> [13,] "1 13 89" "" "" #> [14,] "5/27/1979" "" "" #> [15,] "12/31/99" "" "" #> [16,] "DOB:12/11/00" "DOB:%d/%Om/%y" "" #> [17,] "-----------" "" "" #> [18,] "Thu, 1 July 2004 22:30:00" "" "" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "" "" #> [20,] "Thu, 1July 2004 at 22:30:00" "" "" #> [21,] "Thu, 1July2004 22:30:00" "" "" #> [22,] "Thu, 1July04 22:30:00" "" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "" "" #> [24,] "-----------" "" "" #> [25,] "1979-05-27 05:00:59" "" "" #> [26,] "1979-05-27" "" "" #> [27,] "-----------" "" "" #> [28,] "3 jan 2000" "%d %Om %Y" "%d %Om %Y" #> [29,] "17 april 85" "%d %Om %y" "" #> [30,] "27/5/1979" "%d/%Om/%Y" "%d/%Om/%Y" #> [31,] "20 01 89" "%d %Om %y" "" #> [32,] "00/13/10" "" "" #> [33,] "-------" "" "" #> [34,] "14 12 00" "%d %Om %y" "" #> [35,] "03:23:22 pm" "" "" #> dOmy dOmY dmy dbY dBy dBY #> [1,] "" "" "" "" "" "" #> [2,] "" "" "" "" "" "" #> [3,] "" "" "" "" "" "" #> [4,] "" "" "" "" "" "" #> [5,] "" "" "" "" "" "" #> [6,] "" "" "" "" "" "" #> [7,] "" "" "" "" "" "" #> [8,] "" "" "" "" "" "" #> [9,] "" "" "" "" "" "" #> [10,] "" "" "" "" "" "" #> [11,] "%d %Om %Y" "%d %Om %Y" "%d %m %Y" "" "" "" #> [12,] "%d %Om %y" "" "%d %m %y" "" "" "" #> [13,] "" "" "" "" "" "" #> [14,] "" "" "" "" "" "" #> [15,] "" "" "" "" "" "" #> [16,] "DOB:%d/%Om/%y" "" "DOB:%d/%m/%y" "" "" "" #> [17,] "" "" "" "" "" "" #> [18,] "" "" "" "" "" "" #> [19,] "" "" "" "" "" "" #> [20,] "" "" "" "" "" "" #> [21,] "" "" "" "" "" "" #> [22,] "" "" "" "" "" "" #> [23,] "" "" "" "" "" "" #> [24,] "" "" "" "" "" "" #> [25,] "" "" "" "" "" "" #> [26,] "" "" "" "" "" "" #> [27,] "" "" "" "" "" "" #> [28,] "%d %Om %Y" "%d %Om %Y" "%d %b %Y" "%d %b %Y" "" "" #> [29,] "%d %Om %y" "" "%d %B %y" "" "%d %B %y" "" #> [30,] "%d/%Om/%Y" "%d/%Om/%Y" "%d/%m/%Y" "" "" "" #> [31,] "%d %Om %y" "" "%d %m %y" "" "" "" #> [32,] "" "" "" "" "" "" #> [33,] "" "" "" "" "" "" #> [34,] "%d %Om %y" "" "%d %m %y" "" "" "" #> [35,] "" "" "" "" "" ""
#> dOmy dOmy dOmy dOmy dOmy #> "%d %Om %Y" "%d %Om %y" "DOB:%d/%Om/%y" "%d %Om %Y" "%d %Om %y" #> dOmy dOmy dOmy dOmY dOmY #> "%d/%Om/%Y" "%d %Om %y" "%d %Om %y" "%d %Om %Y" "%d %Om %Y" #> dOmY dOmy dOmy dOmy dOmy #> "%d/%Om/%Y" "%d %Om %Y" "%d %Om %y" "DOB:%d/%Om/%y" "%d %Om %Y" #> dOmy dOmy dOmy dOmy dOmY #> "%d %Om %y" "%d/%Om/%Y" "%d %Om %y" "%d %Om %y" "%d %Om %Y" #> dOmY dOmY dmy dmy dmy #> "%d %Om %Y" "%d/%Om/%Y" "%d %m %Y" "%d %m %y" "DOB:%d/%m/%y" #> dmy dmy dmy dmy dmy #> "%d %b %Y" "%d %B %y" "%d/%m/%Y" "%d %m %y" "%d %m %y" #> dbY dBy #> "%d %b %Y" "%d %B %y"
guess_formats(x, c("dBY HMS", "dbY HMS", "dmyHMS", "BdY H"), print_matches = TRUE)
#> dOmYHMS #> [1,] "February 20th 1973" "" #> [2,] "february 14, 2004" "" #> [3,] "Sunday, May 1, 2000" "" #> [4,] "Sunday, May 1, 2000" "" #> [5,] "february 14, 04" "" #> [6,] "Feb 20th 73" "" #> [7,] "January 5 1999 at 7pm" "" #> [8,] "jan 3 2010" "" #> [9,] "Jan 1, 1999" "" #> [10,] "jan 3 10" "" #> [11,] "01 3 2010" "" #> [12,] "1 3 10" "" #> [13,] "1 13 89" "" #> [14,] "5/27/1979" "" #> [15,] "12/31/99" "" #> [16,] "DOB:12/11/00" "" #> [17,] "-----------" "" #> [18,] "Thu, 1 July 2004 22:30:00" "Thu, %d %Om %Y %H:%M:%S" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "Thu, %dst of %Om %Y at %H:%M:%S" #> [20,] "Thu, 1July 2004 at 22:30:00" "Thu, %d%Om %Y at %H:%M:%S" #> [21,] "Thu, 1July2004 22:30:00" "Thu, %d%Om%Y %H:%M:%S" #> [22,] "Thu, 1July04 22:30:00" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "%d %Om %Y, %H:%M:%S pm" #> [24,] "-----------" "" #> [25,] "1979-05-27 05:00:59" "" #> [26,] "1979-05-27" "" #> [27,] "-----------" "" #> [28,] "3 jan 2000" "" #> [29,] "17 april 85" "" #> [30,] "27/5/1979" "" #> [31,] "20 01 89" "" #> [32,] "00/13/10" "" #> [33,] "-------" "" #> [34,] "14 12 00" "" #> [35,] "03:23:22 pm" "" #> dOmYHMS dOmyHMS #> [1,] "" "" #> [2,] "" "" #> [3,] "" "" #> [4,] "" "" #> [5,] "" "" #> [6,] "" "" #> [7,] "" "" #> [8,] "" "" #> [9,] "" "" #> [10,] "" "" #> [11,] "" "" #> [12,] "" "" #> [13,] "" "" #> [14,] "" "" #> [15,] "" "" #> [16,] "" "" #> [17,] "" "" #> [18,] "Thu, %d %Om %Y %H:%M:%S" "Thu, %d %Om %Y %H:%M:%S" #> [19,] "Thu, %dst of %Om %Y at %H:%M:%S" "Thu, %dst of %Om %Y at %H:%M:%S" #> [20,] "Thu, %d%Om %Y at %H:%M:%S" "Thu, %d%Om %Y at %H:%M:%S" #> [21,] "Thu, %d%Om%Y %H:%M:%S" "Thu, %d%Om%Y %H:%M:%S" #> [22,] "" "Thu, %d%Om%y %H:%M:%S" #> [23,] "%d %Om %Y, %H:%M:%S pm" "%d %Om %Y, %H:%M:%S pm" #> [24,] "" "" #> [25,] "" "" #> [26,] "" "" #> [27,] "" "" #> [28,] "" "" #> [29,] "" "" #> [30,] "" "" #> [31,] "" "" #> [32,] "" "" #> [33,] "" "" #> [34,] "" "" #> [35,] "" "" #> dBYHMS dbYHMS #> [1,] "" "" #> [2,] "" "" #> [3,] "" "" #> [4,] "" "" #> [5,] "" "" #> [6,] "" "" #> [7,] "" "" #> [8,] "" "" #> [9,] "" "" #> [10,] "" "" #> [11,] "" "" #> [12,] "" "" #> [13,] "" "" #> [14,] "" "" #> [15,] "" "" #> [16,] "" "" #> [17,] "" "" #> [18,] "Thu, %d %B %Y %H:%M:%S" "Thu, %d %B %Y %H:%M:%S" #> [19,] "Thu, %dst of %B %Y at %H:%M:%S" "Thu, %dst of %B %Y at %H:%M:%S" #> [20,] "Thu, %d%B %Y at %H:%M:%S" "Thu, %d%B %Y at %H:%M:%S" #> [21,] "Thu, %d%B%Y %H:%M:%S" "Thu, %d%B%Y %H:%M:%S" #> [22,] "" "" #> [23,] "" "%d %b %Y, %H:%M:%S pm" #> [24,] "" "" #> [25,] "" "" #> [26,] "" "" #> [27,] "" "" #> [28,] "" "" #> [29,] "" "" #> [30,] "" "" #> [31,] "" "" #> [32,] "" "" #> [33,] "" "" #> [34,] "" "" #> [35,] "" "" #> dmyHMS BdYH #> [1,] "" "" #> [2,] "" "" #> [3,] "" "" #> [4,] "" "" #> [5,] "" "" #> [6,] "" "" #> [7,] "" "%B %d %Y at %Hpm" #> [8,] "" "" #> [9,] "" "" #> [10,] "" "" #> [11,] "" "" #> [12,] "" "" #> [13,] "" "" #> [14,] "" "" #> [15,] "" "" #> [16,] "" "" #> [17,] "" "" #> [18,] "Thu, %d %B %Y %H:%M:%S" "" #> [19,] "Thu, %dst of %B %Y at %H:%M:%S" "" #> [20,] "Thu, %d%B %Y at %H:%M:%S" "" #> [21,] "Thu, %d%B%Y %H:%M:%S" "" #> [22,] "Thu, %d%B%y %H:%M:%S" "" #> [23,] "%d %b %Y, %H:%M:%S pm" "" #> [24,] "" "" #> [25,] "" "" #> [26,] "" "" #> [27,] "" "" #> [28,] "" "" #> [29,] "" "" #> [30,] "" "" #> [31,] "" "" #> [32,] "" "" #> [33,] "" "" #> [34,] "" "" #> [35,] "" ""
#> dOmYHMS dOmYHMS #> "%a, %d %Om %Y %H:%M:%S" "%a, %dst of %Om %Y at %H:%M:%S" #> dOmYHMS dOmYHMS #> "%a, %d%Om %Y at %H:%M:%S" "%a, %d%Om%Y %H:%M:%S" #> dOmYHMS dOmYHMS #> "%d %Om %Y, %H:%M:%S pm" "%a, %d %Om %Y %H:%M:%S" #> dOmYHMS dOmYHMS #> "%a, %dst of %Om %Y at %H:%M:%S" "%a, %d%Om %Y at %H:%M:%S" #> dOmYHMS dOmYHMS #> "%a, %d%Om%Y %H:%M:%S" "%d %Om %Y, %H:%M:%S pm" #> dOmyHMS dOmyHMS #> "%a, %d %Om %Y %H:%M:%S" "%a, %dst of %Om %Y at %H:%M:%S" #> dOmyHMS dOmyHMS #> "%a, %d%Om %Y at %H:%M:%S" "%a, %d%Om%Y %H:%M:%S" #> dOmyHMS dOmyHMS #> "%a, %d%Om%y %H:%M:%S" "%d %Om %Y, %H:%M:%S pm" #> dBYHMS dBYHMS #> "%a, %d %B %Y %H:%M:%S" "%a, %dst of %B %Y at %H:%M:%S" #> dBYHMS dBYHMS #> "%a, %d%B %Y at %H:%M:%S" "%a, %d%B%Y %H:%M:%S" #> dbYHMS dbYHMS #> "%a, %d %B %Y %H:%M:%S" "%a, %dst of %B %Y at %H:%M:%S" #> dbYHMS dbYHMS #> "%a, %d%B %Y at %H:%M:%S" "%a, %d%B%Y %H:%M:%S" #> dbYHMS dmyHMS #> "%d %b %Y, %H:%M:%S pm" "%a, %d %B %Y %H:%M:%S" #> dmyHMS dmyHMS #> "%a, %dst of %B %Y at %H:%M:%S" "%a, %d%B %Y at %H:%M:%S" #> dmyHMS dmyHMS #> "%a, %d%B%Y %H:%M:%S" "%a, %d%B%y %H:%M:%S" #> dmyHMS BdYH #> "%d %b %Y, %H:%M:%S pm" "%B %d %Y at %Hpm" #> dOmYHMS dOmYHMS #> "Thu, %d %Om %Y %H:%M:%S" "Thu, %dst of %Om %Y at %H:%M:%S" #> dOmYHMS dOmYHMS #> "Thu, %d%Om %Y at %H:%M:%S" "Thu, %d%Om%Y %H:%M:%S" #> dOmYHMS dOmYHMS #> "%d %Om %Y, %H:%M:%S pm" "Thu, %d %Om %Y %H:%M:%S" #> dOmYHMS dOmYHMS #> "Thu, %dst of %Om %Y at %H:%M:%S" "Thu, %d%Om %Y at %H:%M:%S" #> dOmYHMS dOmYHMS #> "Thu, %d%Om%Y %H:%M:%S" "%d %Om %Y, %H:%M:%S pm" #> dOmyHMS dOmyHMS #> "Thu, %d %Om %Y %H:%M:%S" "Thu, %dst of %Om %Y at %H:%M:%S" #> dOmyHMS dOmyHMS #> "Thu, %d%Om %Y at %H:%M:%S" "Thu, %d%Om%Y %H:%M:%S" #> dOmyHMS dOmyHMS #> "Thu, %d%Om%y %H:%M:%S" "%d %Om %Y, %H:%M:%S pm" #> dBYHMS dBYHMS #> "Thu, %d %B %Y %H:%M:%S" "Thu, %dst of %B %Y at %H:%M:%S" #> dBYHMS dBYHMS #> "Thu, %d%B %Y at %H:%M:%S" "Thu, %d%B%Y %H:%M:%S" #> dbYHMS dbYHMS #> "Thu, %d %B %Y %H:%M:%S" "Thu, %dst of %B %Y at %H:%M:%S" #> dbYHMS dbYHMS #> "Thu, %d%B %Y at %H:%M:%S" "Thu, %d%B%Y %H:%M:%S" #> dbYHMS dmyHMS #> "%d %b %Y, %H:%M:%S pm" "Thu, %d %B %Y %H:%M:%S" #> dmyHMS dmyHMS #> "Thu, %dst of %B %Y at %H:%M:%S" "Thu, %d%B %Y at %H:%M:%S" #> dmyHMS dmyHMS #> "Thu, %d%B%Y %H:%M:%S" "Thu, %d%B%y %H:%M:%S" #> dmyHMS BdYH #> "%d %b %Y, %H:%M:%S pm" "%B %d %Y at %Hpm"
guess_formats(x, c("ymd HMS"), print_matches = TRUE)
#> yOmdHMS #> [1,] "February 20th 1973" "" #> [2,] "february 14, 2004" "" #> [3,] "Sunday, May 1, 2000" "" #> [4,] "Sunday, May 1, 2000" "" #> [5,] "february 14, 04" "" #> [6,] "Feb 20th 73" "" #> [7,] "January 5 1999 at 7pm" "" #> [8,] "jan 3 2010" "" #> [9,] "Jan 1, 1999" "" #> [10,] "jan 3 10" "" #> [11,] "01 3 2010" "" #> [12,] "1 3 10" "" #> [13,] "1 13 89" "" #> [14,] "5/27/1979" "" #> [15,] "12/31/99" "" #> [16,] "DOB:12/11/00" "" #> [17,] "-----------" "" #> [18,] "Thu, 1 July 2004 22:30:00" "" #> [19,] "Thu, 1st of July 2004 at 22:30:00" "" #> [20,] "Thu, 1July 2004 at 22:30:00" "" #> [21,] "Thu, 1July2004 22:30:00" "" #> [22,] "Thu, 1July04 22:30:00" "" #> [23,] "21 Aug 2011, 11:15:34 pm" "" #> [24,] "-----------" "" #> [25,] "1979-05-27 05:00:59" "%Y-%Om-%d %H:%M:%S" #> [26,] "1979-05-27" "" #> [27,] "-----------" "" #> [28,] "3 jan 2000" "" #> [29,] "17 april 85" "" #> [30,] "27/5/1979" "" #> [31,] "20 01 89" "" #> [32,] "00/13/10" "" #> [33,] "-------" "" #> [34,] "14 12 00" "" #> [35,] "03:23:22 pm" "" #> ymdHMS #> [1,] "" #> [2,] "" #> [3,] "" #> [4,] "" #> [5,] "" #> [6,] "" #> [7,] "" #> [8,] "" #> [9,] "" #> [10,] "" #> [11,] "" #> [12,] "" #> [13,] "" #> [14,] "" #> [15,] "" #> [16,] "" #> [17,] "" #> [18,] "" #> [19,] "" #> [20,] "" #> [21,] "" #> [22,] "" #> [23,] "" #> [24,] "" #> [25,] "%Y-%m-%d %H:%M:%S" #> [26,] "" #> [27,] "" #> [28,] "" #> [29,] "" #> [30,] "" #> [31,] "" #> [32,] "" #> [33,] "" #> [34,] "" #> [35,] ""
#> yOmdHMS ymdHMS #> "%Y-%Om-%d %H:%M:%S" "%Y-%m-%d %H:%M:%S"