﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Advanced Analytics User Group  / Integer to date conversion - Error / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Sat, 06 Sep 2008 22:42:32 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Integer to date conversion - Error</title><link>http://www.teradata.com/teradataforum/Topic9495-22-1.aspx</link><description>Laxmi,Maybe the following structure helps you:create table test (id INTEGER);INSERT TEST VALUES (2007090909);INSERT TEST VALUES (2007110914);SELECT CAST((CAST (ID AS CHAR(10))) AS TIMESTAMP FORMAT 'YYYYMMDDHH')FROM TEST;Good luck!</description><pubDate>Fri, 09 Nov 2007 11:48:12 GMT</pubDate><dc:creator>Fabio</dc:creator></item><item><title>RE: Integer to date conversion - Error</title><link>http://www.teradata.com/teradataforum/Topic9495-22-1.aspx</link><description>Hi Laxmi,providing the actual error is more helpful than just "doesn't work".And why do you cast cal_id to an integer if it's already an integer?Dieter</description><pubDate>Tue, 30 Oct 2007 05:39:47 GMT</pubDate><dc:creator>dnoeth</dc:creator></item><item><title>Integer to date conversion - Error</title><link>http://www.teradata.com/teradataforum/Topic9495-22-1.aspx</link><description>Here is the query i am trying to run :select cast(cast(cast(cal.cal_id as integer format '9999999999') as varchar(10) ) as timestamp(0) format 'YYYYMMDDHH')  from miesa01.calen cal Here cal_id is an integer column.. i have tried all the variations for this .. the strange part is the following query works perfectly fineselect cast(cast(cast(2007090909 as integer format '9999999999') as varchar(10) ) as timestamp(0) format 'YYYYMMDDHH')  from miesa01.D_CAL_CALENDAR cal  Please try to pur your ideas and experience. Thanks,Laxmi</description><pubDate>Mon, 29 Oct 2007 19:14:38 GMT</pubDate><dc:creator>tera_cert</dc:creator></item></channel></rss>