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 in AWS by Anjali
• 2,930 points
2,022 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 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,090 points
52 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,440 points
6,097 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,090 points
2,372 views
+1 vote
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 in AWS by rishab
489 views