Archives of the TeradataForum
Message Posted: Mon, 07 Jan 2002 @ 14:29:51 GMT
Subj: | | Dates & times |
|
From: | | Geoffrey Rommel |
Just to clarify one point that confused me when I started working with Teradata: TIME and CURRENT_TIME are different. In V1, Teradata
had a DATE data type but not a TIME data type, so FLOAT was used for times, as it still is in the dictionary tables. As you can see from the
following, DATE and CURRENT_DATE are the same thing.
select type(date);
Type(Date)
---------------------------------------
DATE
select type(current_date);
Type(Date)
---------------------------------------
DATE
But TIME (Teradata) and CURRENT_TIME (ANSI) are not.
select type(time);
Type(Time)
---------------------------------------
FLOAT
select type(current_time);
Type(Current Time(0))
---------------------------------------
TIME(0) WITH TIME ZONE
This is why you can format time with a numeric format (e.g., time (format '99:99:99.999999') ), but you cannot do the same with
current_time.
--wgr
|