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
27,897 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,170 points
947 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,540 points
53,703 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,170 points
7,618 views
+2 votes
1 answer

How to Use Amazon AWS Credentials to Access/Query Tables in AWS RDS Instance through Mobile App

You should make your backend functions to ...READ MORE

answered Aug 28, 2018 in AWS by Priyaj
• 58,020 points
1,339 views
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
4,890 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP