Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 30 Oct 2012 @ 19:11:40 GMT


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


Subj:   Re: Date conversion not working
 
From:   Anomy Anom

< -- Anonymously Posted: Tuesday, October 30, 2012 10:11 -- >

Hi,

Thanks for your answers. I have already tried using date as below but is not working

     sel
     cast(cast(emp_dt as date format 'mm/dd/yyyy') as date format 'yyyy/mm/dd') "dt"
     from tblname
     where dt= date;

I also tried casting date/current_date in where clause, but somehow it is still not working and giving the same error (invalid date). Even our date default is yyyy/mm/dd

     sel
     cast(cast(emp_dt as date format 'mm/dd/yyyy') as date format 'yyyy/mm/dd') "dt"
     from tblname
     where dt= cast(current_date as date format 'yyyy/mm/dd');


     
  <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: 15 Jun 2023