|
Archives of the TeradataForumMessage Posted: Wed, 05 May 2010 @ 18:17:28 GMT
<-- Anonymously Posted: Wednesday, May 05, 2010 14:10 --> Hi - I am working on Some Oracle to Teradata migration : 1.) Oracle Function : select trunc(sysdate,'MI') , SYSDATE FROM DUAL Result: is 2010-05-05 13:39:00 , 2010-05-05 13:39:23 To achieve this in Teradata: sel cast(cast( Current_timestamp as char(16) ) || ':00' as timestamp(0) ) 2.) select sysdate, trunc( (sysdate + 241/24 ), 'MI' )from dual Results: 5/5/2010 5:48:46 PM, 5/15/2010 6:48:00 PM 241 is hours: 241/24 = 10 days 1 hour - Adding it to the current_timestamp Thinking to achieve this using SUBSTRING and MOD in Teradata. Any simpler ways to achieve the above conversions? Thanks-
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||