﻿<?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 Database  / convert varchar to date / 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>Wed, 03 Dec 2008 16:06:00 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: convert varchar to date</title><link>http://www.teradata.com/teradataforum/Topic11398-9-1.aspx</link><description>Sounds like business_date is a varchar column, containing a date in the format of 'mm/dd/yyyy'.  If so, then I think this would give you what you want (a date data type for this value):sel business_date (date, format 'mm/dd/yyyy')from ...</description><pubDate>Mon, 12 May 2008 14:49:27 GMT</pubDate><dc:creator>rs131112</dc:creator></item><item><title>RE: convert varchar to date</title><link>http://www.teradata.com/teradataforum/Topic11398-9-1.aspx</link><description>Hi Mohan,sorry yaar. Plz ignore my pervious reply.Please store/change the date format to yyyymmdd then do the further processing.I think it will work. because teradata stores the date in yyyymmdd format.Please try and let me know too.</description><pubDate>Sat, 10 May 2008 03:21:44 GMT</pubDate><dc:creator>Monika</dc:creator></item><item><title>RE: convert varchar to date</title><link>http://www.teradata.com/teradataforum/Topic11398-9-1.aspx</link><description>Hi Mohan,I was able to run successfully the below query:SEL cast( cast(current_date as TIMESTAMP(0) format 'dd-mm-yyyy') AS DATE FORMAT 'YYYY-MM-DD');Current Date------------  2008-05-09I don't see any problem in that.</description><pubDate>Fri, 09 May 2008 11:21:02 GMT</pubDate><dc:creator>Monika</dc:creator></item><item><title>RE: convert varchar to date</title><link>http://www.teradata.com/teradataforum/Topic11398-9-1.aspx</link><description>Hi Mohan,did you submit that query using SQL Assistant?This is using the windows locale definition of a date, you have to modify that using:Tools - Options - General: Display dates in this formatIf this isn't a problem related to SQL Assistant, then you have to re-phrase your question, because i didn't catch it...Dieter</description><pubDate>Fri, 09 May 2008 07:04:09 GMT</pubDate><dc:creator>dnoeth</dc:creator></item><item><title>convert varchar to date</title><link>http://www.teradata.com/teradataforum/Topic11398-9-1.aspx</link><description>Hi ,Below sql giving invalid time stamp .12/31/2007 This is in varchar format 'mm/dd/yyyy'.I need to convert varchar to date   PERIOD =======12/31/2007 SEL cast( cast(BUSINESS_DATE  as TIMESTAMP(0) format 'dd-mm-yyyy') AS DATE FORMAT 'YYYY-MM-DD') from PERIOD /Thanks in advanceMohan</description><pubDate>Fri, 09 May 2008 04:18:27 GMT</pubDate><dc:creator>mohan705</dc:creator></item></channel></rss>