Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Apr 2012 @ 10:00:03 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Help required in casting the date
 
From:   Sushmita Chowdhury

Hi,

Please use the below syntax, it will give the exact o/p u want.

     sel trim(cast(cast('070401' as date format 'yymmdd') as date format 'yyyy-mm-dd'))

     Trim(BOTH FROM '070401')

     2007-04-01

Thanks,

Sushmita



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 23 Jun 2019