Athena does not recognize date functions

0

Hi,

I have date in one of the table columns in the format "8/14/2017". I get an error when I use the function from_unixtime to convert it into ISO time date.

The query I am using is

select TO_DATE(from_unixtime(UNIX_TIMESTAMP('07/03/2013', 'yyyy-mm-dd')))

The following is the error:: Can you please take a look at this

Your query has the following error(s):
SYNTAX_ERROR: line 1:30: Function unix_timestamp not registered

thanks,
sharu

Edited by: SSharu on Oct 17, 2017 11:44 PM

SSharu
feita há 7 anos4075 visualizações
2 Respostas
0

I have this same problem. Does anybody have an answer?

xv23
respondido há 6 anos
0

Not sure if these just renamed since you tried but unix_timestamp is not listed on the date functions in Presto - https://prestodb.io/docs/current/functions/datetime.html - you could do to_unixtime though but it takes a timestamp. Given the original query the unixtime stuff looks unnecessary, you could just use date_parse e.g. date_parse('07/03/2013', 'yyyy-mm-dd')

respondido há 6 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas