Monday, March 19, 2012

Oracle's TO_CHAR, what in SQL Server 2005?

Greetings,

In oracle i use the following sentence TO_CHAR(Table1.DateIn, ,'mm/yyyy') within a query. I need how to replace this for using it in SQL Server. I tried to use the SQL Server CONVERT function but nothing work. Could you help me?

Thank you in advance,

Fernando

use convert(varchar,table1.dateIn)|||SUBSTRING(CONVERT(varchar(10), Table1.Dateln, 103), 4, 7)

No comments:

Post a Comment