Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 29 May 2012 @ 13:37:13 GMT


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


Subj:   Re: DATE Format 'YYDDD'?
 
From:   De Pons, Paul

YY is the two digit year of course then DDD is the day of the year versus DD which returns the day of the month. Formats only affect the display of the data not how the data is stored.

     SELECT CAST(CAST(DATE AS FORMAT'YYDDD') AS CHAR(50)) AS FORMAT_YYDDD
                    ,CAST(CAST(DATE AS FORMAT'YYDD') AS CHAR(50)) AS FORMAT_YYDD
                  , DAY_OF_YEAR(DATE)
                  ,DAY_OF_MONTH(DATE)


     FORMAT_YYDDD   FORMAT_YYDD   DAY_OF_YEAR   DAY_OF_MONTH
     12150          1229          150           29

nce



     
  <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