![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Tue, 13 May 2008 @ 11:00:32 GMT
Gagan, Asuming that the expected functionallity is to get the year and month for a day-in-year sequential stored as an integer (with 0 corresponding to the date 1900-01-01), the following Teradata expression should do the trick. CAST(CAST(CAST( CAST(CAST( (CASE WHEN column_name = 0 THEN 1900001 ELSE column_name END) AS FORMAT '9(7)') AS CHAR(7)) AS DATE FORMAT 'YYYYDDD') AS FORMAT 'YYYYMM') AS CHAR(6)) Jonas Blomqvist
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||