I am looking to convert the following string: mmm-dd-yyyy to a date: yyyy-mm-dd
e.g
Nov-06-2015 to 2015-11-06
within Amazon Athena
I would do date_parse. Adjust your regex accordingly.
select date_parse('Nov-06-2015','%b-%d-%Y')
2015-11-06 00:00:00.000
refd:https://prestodb.io/docs/current/functions/datetime.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With