AWSAWS Athena

Athena – SQL to get date of next Monday

I was recently asked how to get date of next Monday irrespective of which day of the week sql is executed. So thought to share it, in-case someone else has such requirement.

select date_add('day', 8 - extract(day_of_week from current_date), current_date)

Or,

select date_trunc('week', current_date) + interval '7' day;

Happy learning πŸ™‚

Leave a Reply