LoginSignup
3
0

More than 5 years have passed since last update.

Athena で S3 Log の datetime を parse して任意の文字列に format する方法

Last updated at Posted at 2018-03-30
SELECT format_datetime(date_parse(datetime, '%d/%b/%Y:%H:%i:%s +0000'),'YYYY-MM-dd HH-mm-ss') FROM "S3LOG_DATABASE"."S3LOG_TABLE" limit 10

formate_datetime は http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html なので注意。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0