Teradata find the First Day of the Year

Here's a way to determine the first day of a year in Teradata SQL

Solution:

ADD_MONTHS(dt, -(EXTRACT(MONTH FROM dt) - 1)) + (1 - EXTRACT(DAY FROM dt))


dan-irving

posted on 28 Jul 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds