Amazon Athena Convert String to Date

后端 未结 1 408
没有蜡笔的小新
没有蜡笔的小新 2021-01-11 16:49

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

相关标签:
1条回答
  • 2021-01-11 17:28

    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

    0 讨论(0)
提交回复
热议问题