days since Jan 1 ,4712 BC in Teradata

General
Enthusiast

days since Jan 1 ,4712 BC in Teradata

Hi All,

1) Is it possible to specify BC(Before Christ) or AD in date format ?. I checked the
Manual , but i couldn't get anything.
2) Is there any equivalent syntax in Teradata to find the number of days since Jan
1 ,4712 BC.

Thanks
Sakthi
6 REPLIES
Enthusiast

Re: days since Jan 1 ,4712 BC in Teradata

Valid range of dates in Teradata is from 0001-01-01 through 9999-12-31. The same applies for timestamps as well. To work with Julian dates you may need to build a physical table or UDF and use a character data type in your table(s).
Junior Supporter

Re: days since Jan 1 ,4712 BC in Teradata

You can handle julian dates keeping in mind that dates are integers, and you can apply translations to them.

You may take a look here:

http://carlosal.wordpress.com/2009/07/14/importando-fechas-julianas-a-teradata/

(in spanish, as usual)

HTH.

Cheers.

Carlos.
Enthusiast

Re: days since Jan 1 ,4712 BC in Teradata

Thanks a lot Carlos ,it's working
Enthusiast

Re: days since Jan 1 ,4712 BC in Teradata

Good information Carlos. (Thank you Google Translator. ;) )
Enthusiast

Re: days since Jan 1 ,4712 BC in Teradata

thanks for chrome... I can read spanish now!!!! LOL...
Enthusiast

Re: days since Jan 1 ,4712 BC in Teradata

BTW, here is my solution: change the sys_calendar caldates table by adding the precomputed value in, expand the calbasics view , calendar view with the column. it should save a lot of headache system wide for all applications using such date.
It also saves cpu seconds considering the date time logic were constantly used in typical data warehouse. a tiny storage exchange for savings of CPU.