﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2005 / Working with Oracle  / substr of datetime as char field from MYSql table / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 20 Jun 2013 00:57:32 GMT</lastBuildDate><ttl>20</ttl><item><title>substr of datetime as char field from MYSql table</title><link>http://www.sqlservercentral.com/Forums/Topic1402059-1042-1.aspx</link><description>I am trying to extract just the time portion of the datetime field. i am creating a view in MYSql which will then be queried via an openquery statement form SQL Server and it needs to be a CHAR field.SELECT substr(`calldate`,12,8)  AS 'TIME'FROM `asteriskcdrdb`.`cdr`;the calldate field is defined as datetime in MYSql. i need just the time portion and to save it as a CHAR filed for SQL Sever. as you can see I am clueless.Thank you calldate field: in table2013-01-02 15:10:41</description><pubDate>Wed, 02 Jan 2013 13:19:28 GMT</pubDate><dc:creator>TryingToLearn</dc:creator></item></channel></rss>