Archives of the TeradataForum
Message Posted: Wed, 11 Jan 2006 @ 22:52:23 GMT
Subj: | | Re: Date manipulation - Timestamp in WHERE clause |
|
From: | | Calkins, Dennis |
Look at the section
"Dates and Intervals" ( chapter 4 in my copy )
in the
SQL Reference -- Data Types and Literals
Manual.... ( sorry I forgot the name of the section in my last post. )
Sel current_timestamp as mytimestamp,
Cast ( (mytimestamp - interval '2' day ) as date),
Cast ( (mytimestamp - interval '20' Hour ) as date);
*** Query completed. One row found. 3 columns returned.
*** Total elapsed time was 2 seconds.
mytimestamp (mytimestamp- 2) (mytimestamp- 20)
-------------------------------- ---------------- -----------------
2006-01-11 14:18:56.020000+00:00 06/01/09 06/01/10
BTEQ -- Enter your DBC/SQL request or BTEQ command:
|