Date data type explanation

Database

Date data type explanation

dear all,

we are using teradata as our source system into SAP BI and i have this date format YYYY-MM-DD with the length 4. Can you please explain to me how this works? does 4 means the date format? e.g 3 == (perhaps) mm-yyyy-dd ?

thanks.
4 REPLIES
Junior Supporter

Re: Date data type explanation

DATE is stored as INTEGER in TERADATA.

HTH.

Cheers.

Carlos.

Re: Date data type explanation

so if its integer, how does that explain data type 4? If its 4, what do i get as a result?
Junior Supporter

Re: Date data type explanation

((YEAR - 1900) * 10000) + (MONTH * 12) + DAY

31/12/2007 = 1071231

HTH.

Cheers.

Carlos.
Teradata Employee

Re: Date data type explanation

Hi all,

Data is stored as INTEGER (4Bytes)

The right formula is this one: ((YYYY-1900))*10000 +(MM*100)+DD

Bye