![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 08 Jun 2005 @ 11:48:04 GMT
I've used logic like;
select cast( cast(ADD_MONTHS(CAST( SUBSTRING(TRIM(DATE_FIELD) FROM 1 FOR 4)
||'-'||SUBSTRING(TRIM(DATE_FIELD) FROM 5)||'-01' AS DATE),-36) as date
FORMAT 'YYYYMM') as char(6))
In code in the past. Not pretty, but gets the job done. Stuart
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||