|
|
Archives of the TeradataForum
Message Posted: Tue, 29 May 2012 @ 13:37:13 GMT
Subj: | | Re: DATE Format 'YYDDD'? |
|
From: | | De Pons, Paul |
YY is the two digit year of course then DDD is the day of the year versus DD which returns the day of the month. Formats only affect the
display of the data not how the data is stored.
SELECT CAST(CAST(DATE AS FORMAT'YYDDD') AS CHAR(50)) AS FORMAT_YYDDD
,CAST(CAST(DATE AS FORMAT'YYDD') AS CHAR(50)) AS FORMAT_YYDD
, DAY_OF_YEAR(DATE)
,DAY_OF_MONTH(DATE)
FORMAT_YYDDD FORMAT_YYDD DAY_OF_YEAR DAY_OF_MONTH
12150 1229 150 29
nce
| |