Re: Number to Date

From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 09/27/04


Date: Mon, 27 Sep 2004 17:00:19 -0500

SQL Server can do this with simple CAST operations, for instance, do:

SELECT CAST( CAST( 1900 + LEFT( c, 3 ) AS CHAR( 4 ) ) + '0101' AS DATETIME )
     + CAST( RIGHT( c, 3 ) AS INT ) - 1
  FROM tbl ;

-- where c is the column from the table tbl.

-- 
Anith