The lubridate package provides convenient functions to format date and datetime objects from character strings. The functions are permutations of
LetterElement to parseBase R equivalentyyear%y, %Ym (with y and d)month%m, %b, %h, %Bdday%d, %ehhour%H, %I%pm (with h and s)minute%Msseconds%S
e.g. ymd(...