insert into TableName (dt) values (to_date(‘2004-09-07’,’yyyy-mm-dd’))

解决方案 »

  1.   

    commandText = "insert into table1 values(INDEX1.NEXTVAL,"
                commandText += DOC_NAME.Value
                commandText += ","
                commandText += to_date(System.IO.File.GetCreationTime(FileName1),"yyyy-mm-dd hh24:mi:ss")
      

  2.   

    commandText = "insert into table1 values(INDEX1.NEXTVAL,"
                commandText += DOC_NAME.Value
                commandText += ","
    string strTemp;
                strTemp= to_date(System.IO.File.GetCreationTime(FileName1),"yyyy-mm-dd hh24:mi:ss")
                commandText = commandText+strTemp
                commandText +=");"