Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Convert Number to Date

Author  Topic 

shanmugaraj
Posting Yak Master

219 Posts

Posted - 2010-07-22 : 06:48:28
Hi,
I have a field with 901201
i am trying to reutn as 01-12-1990

I tryed
convert(varchar(10) ,DateField,105) as [Inception Date]
but i am unable to get as needed.
kindly help.
thanks in advance.

THANKS
SHANMUGARAJ
nshanmugaraj@gmail.com

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-07-22 : 08:00:15
SELECT CAST(CAST(19000000 + Col1 AS CHAR(8)) AS DATETIME)
FROM Table1



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -