Author: sukumarraju | Posted on: 9/2/2008 10:04:15 AM | Views : 278

Hi

Reading Date value from SQL Server Table returned as "5/22/2008 12:00:00 AM". It is required to insert this Date value into Oracle Table, here the format problem. Because Oracle accepts as 22/May/2008 12:00:00

I am coding as below (Please note here only important code outlined... Not all parts)

//read SQL DB Table date column

while(dr.read())

{ 

string dateCol = Using rdr["col_date"].ToString();

}

here needs to convert Date, so that it can be inserted into Oracle Table in right format i.e., 22/MAY/08 12:00:00

//Insert into Oracle Table

oledbCommand.Text = "INSERT INTO MYTABLE(DATE_COL) VALUES ( '" + dateCol + " ') ";

...

Go to the complete details ...