I\'m on presto and have a date formatted as varchar that looks like -
7/14/2015 8:22:39 AM
I\'ve looked the presto docs and tried various
date_format requires first argument as timestamp so not the best way to convert a string. Use date_parse instead.
date_format
timestamp
date_parse
Also, use %c for non zero-padded month, %e for non zero-padded day of the month and %Y for four digit year.
%c
%e
%Y
SELECT date_parse('7/22/2016 6:05:04 PM', '%c/%e/%Y %r')