You can Date functions in your project. This post is to convert to numeric Date.
DATE_TRUNC ( PERIODIC_DATE, YEAR)
The TRUNC function truncates DATE to year. The input DATE is YYYY-MM-DD. After TRUNC function, it changes to YEAR. That means to YYYY-01-01.
Uses of DATE_TRUNC Function
- This function most frequently being used in data warehousing projects.
- This is one of the best way to work with Date related functions.