I am on presto and I have a date in varchar format that looks like -
7/14/2015 8:22:39 AM
I looked through the docs before and tried various things (cast, date_format, using split_part to parse and then cast) and don't get it to convert to a date format, which I can use with functions like date_diff.
I tried:
cast(fieldname as timestamp) date_format(fieldname, '%Y-%m-%d %T)
Both give me such an error
'Value cannot be cast to timestamp: 3/31/2016 6:05:04 PM'
How do i convert this?
Moosa source share