![]() |
|
Archives of the TeradataForumMessage Posted: Fri, 26 Oct 2012 @ 16:09:45 GMT
< -- Anonymously Posted: Friday, October 26, 2012 10:11 -- > How about something like this?
select '20121024 11:46:13' as a
, ( substring(a from 1 for 4)
|| '-' || substring(a from 5 for 2)
|| '-' || substring(a from 7) )(timestamp(0)) as b
, add_months(b,1) as c
;
Returns:
a b c
20121024 11:46:13 10/24/2012 11:46:13 11/24/2012 11:46:13
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||