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!
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)