Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

112
Vistas
Create date from integers in separate fields in athena aws

I'm super new to athena, so bear with me. I have data stored as integers in three separate columns for year, month and day, as such:

year   month   day
2020   7       10
2020   7       11
2020   7       12

I'd like to turn these three fields into one date. How do I do that?

Thanks in advance!

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

One method is:

select date_parse(cast(year * 10000 + month * 100 + day as varchar(255)), '%Y%m%d')

This should also work:

select date(year || '-' || month || '-' || day)
over 4 years ago · Santiago Trujillo Denunciar

0

You have to use the concat() function. You can see the documentation here.

Depending of the format that you want to use, this can change.

concat(year, '-' , month , '-', day)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda