How to convert String to Date in Amazon Athena

0 votes
I am trying to convert the following string: mmm-dd-yyyy to a date: yyyy-mm-dd

e.g: Jan-01-2019 to 2019-01-01

within Amazon Athena. Is it possible? How can I do that?
Jan 16, 2019 in AWS by Anjali
• 2,950 points
14,316 views

1 answer to this question.

0 votes
You can use date_parse. All you need to do is adjust your regex accordingly.

select date_parse('Jan-01-2019','%b-%d-%Y')

2019-01-01 00:00:00.000
answered Jan 16, 2019 by chandan

Related Questions In AWS

0 votes
1 answer

How to upload a lib for Tomcat in Amazon EC2?

You need to set the proper privileges ...READ MORE

answered Aug 20, 2018 in AWS by Archana
• 4,150 points
322 views
0 votes
1 answer

How to list the contents of Amazon S3 by modified date?

One easy solution would be probably to ...READ MORE

answered Aug 21, 2018 in AWS by datageek
• 2,530 points
34,475 views
0 votes
1 answer

How to connect Amazon RedShift in Apache Spark?

It turns out you just need a ...READ MORE

answered Aug 22, 2018 in AWS by Archana
• 4,150 points
6,027 views
+2 votes
1 answer
0 votes
1 answer
+1 vote
2 answers
0 votes
2 answers
0 votes
1 answer

Is there a Command line tool to access Amazon Athena?

The AWS command line tool supports Amazon Athena operations. 1. ...READ MORE

answered Jan 16, 2019 in AWS by rishab
3,473 views
webinar REGISTER FOR FREE WEBINAR
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP