Re: Number to Date
From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 09/27/04
- Next message: Hari: "Re: format a numeric values with commas"
- Previous message: Anith Sen: "Re: SUBSTRING question"
- In reply to: Miguel Salles: "Number to Date"
- Next in thread: Steve Kass: "Re: Number to Date"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Hari: "Re: format a numeric values with commas"
- Previous message: Anith Sen: "Re: SUBSTRING question"
- In reply to: Miguel Salles: "Number to Date"
- Next in thread: Steve Kass: "Re: Number to Date"
- Messages sorted by: [ date ] [ thread ]