All Forums Database
mehaboob 10 posts Joined 12/09
22 Jan 2010
sql statement to convert hundred year date to yyyy-mm-dd format

hi ,i need to write a sql statement to convert hundred year date to 'yyyy-mm-dd' formatfor example a hundred year date 40196 is equal to 2010-01-19can any one give me an idea how to do this using sql statement in teradata...thanks

Jimm 298 posts Joined 09/07
23 Jan 2010

I presume these dates are the number of days since Jan 1st, 1900.So:select Date '1900-01-01' -1 + 40196;gives you 19th Jan 2010.

You must sign in to leave a comment.