Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 19 Feb 2009 @ 14:50:41 GMT


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


Subj:   Re: Default display of date
 
From:   Sapra, Kapil Dev

Hi,

Try this..

     SELECT
          CAST(CURRENT_TIMESTAMP(0) AS DATE FORMAT 'YYYY-MM-DD'),
          CAST(CAST(CURRENT_TIMESTAMP(0) AS DATE)
                 AS TIMESTAMP(0) FORMAT 'YYYY-MM-DDBHH:MI:SS')
     ;

If you are using ODBC (SQL Assistant etc) then may be need to convert before display..

Like this..

     SELECT
          CAST(CAST(CURRENT_TIMESTAMP(0) AS DATE FORMAT 'YYYY-MM-DD')
                      AS CHAR(10)),
          CAST(CAST(CAST(CURRENT_TIMESTAMP(0) AS DATE)
                      AS TIMESTAMP(0) FORMAT 'YYYY-MM-DDBHH:MI:SS') AS CHAR(19));

Best Regards,

Kapil D Sapra



     
  <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