1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Oracle date / time conversion

Discussion in 'SQL PL/SQL' started by dsub42, Apr 1, 2010.

  1. dsub42

    dsub42 Active Member

    Likes Received:
    Trophy Points:
    Hi I am converting data from an old paradox table to a new oracle table, one of the problems im having is incompatibility with date and time formats:

    some columns contain times in the format : "00:00:00" eg..... "15:00:00"
    some columns have date in the format: "dd/mm/yyyy" eg....... "21/08/2000"
    some columns have time and date eg.. "05/09/2000 15:49:39"

    Currently I have the data held in tables within an access database, and in CSV format.

    Could anyone help me as to how I can get the following into Oracle date formats? there is over 1000 records so manual conversion is out of the question

    Any help would be appreciated
  2. rajavu

    rajavu Forum Guru

    Likes Received:
    Trophy Points:
    @ Bangalore , India
    Better you create a function to recognize whether the value is time part , date part . and perform TO_DATE() function accordingly . And you have to decide which date the target value should be.