Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

substr of datetime as char field from MYSql table Expand / Collapse
Author
Message
Posted Wednesday, January 2, 2013 1:19 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, September 3, 2014 7:20 AM
Points: 51, Visits: 307
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 table
2013-01-02 15:10:41
Post #1402059
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse