Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 10 Nov 2003 @ 21:50:27 GMT


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


Subj:   Re: Format of Date
 
From:   Belle, Patrick A

Craig,

This is an interesting issue.

In BTEQ, I get the correct result with relatively little fanfare. Here's the query...

select date (format 'mmddyyyy'), date

11102003        2003-11-10

In Queryman, however since it doesn't like the format phrase, I have to jump through hoops to disguise it. It's necessary to typecast (into char(8)) a parenthesized expression involving the format phrase, as in ...

select cast((date (format 'mmddyyyy') as char(8))

11102003        2003-11-10

The double parens presumably conceal the format phrase from the ODBC parser. It ought to be possible to drop the typecast and the char(8), but I haven't been able to get it to work doing that.

Pat Belle
Certified Master



     
  <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