Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 30 Jul 2003 @ 20:30:38 GMT


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


Subj:   Re: Create Table -> date default
 
From:   Anomy Anom

<-- Anonymously Posted: Wednesday, July 30, 2003 16:14 -->

Jim,

The programmer is right, if you execute the following query in Teradata:

SELECT -18989899 (DATE)

The result is:

0001-01-01

as YYYY-MM-DD, or whatever format you use for dates.

This is the internal algorithm used by Teradata for dates, the expression is:

(Year * 10000) - 1900 + (Month * 100) + Day = integer which internally represents the date value as a signed 31-bit whole number

Hope this helps...



     
  <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