Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003

    Unanswered: Changing number to date

    I have a table in SQL Server that has a date field whose properties are 'number'. I want to export this data to a table in Oracle. I can't touch the Server table to alter it to be a date. Is there some way I can do this in the Oracle table? Example- SQL Server= 20030324 (March 24,2003). In Oracle I want it to read '24/03/2003', or some other date format.

  2. #2
    Join Date
    Oct 2003

    you could do it through sql like this

    declare @d as int
    set @d = 20031105
    select cast(substring(cast(@d as varchar(8)),5,2)+ '/' +
    substring(cast(@d as varchar(8)),7,2)+ '/' +
    left(cast(@d as varchar(8)),4)as smalldatetime)

  3. #3
    Join Date
    Aug 2003

    Re: you could do it through sql like this

    I need to update a whole column in an Oracle table. Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts