Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 23 Apr 2002 @ 03:44:57 GMT


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


Subj:   Re: Converting 4-digit dates to standard date
 
From:   Sam Mosley

John,

You have gotten several good pieces of advice on dates. However, I didn't see anyone mention that if you define a column as date format 'yyyymm' and store '200204' that it would default to day 01 when selected back through an ODBC connection (like Queryman). So, if you don't specify a day it will return as 01. You can also have defined the column as date format 'yyyy-mm-dd' and then insert '200204' (date, format 'yyyymm') and it will also default the day to 01.

However, if you have defined a column as date format 'yymm' and select it back from BTEQ, and don't override the format you will only get yymm. You can, of course, override the format with 'yymmdd' and then you would get 020401.

In the end, it's probably better to just define what you really want since you can't count on what client tools will be selecting it back later, and there can be a difference in results!

Have a great day.

Sam Mosley



     
  <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