c# - writing a date to oracle table using mvc -


i using mvc , want insert date oracle database. stored value in object add collection (processed_date). used insert statement write database.

all invalid date format. have idea how can fix this? need write exact date "31/12/2099" oracle database.

            object col14value = "31/12/2099";              processed_date = (col14value).tostring()              string sqlins = "insert price_line (processed_date) values (to_date(:processed_date, mm/dd/yyyy) 

the property of processed_date looks this

 public string processed_date { get; set; } 

now begining the error below

[oracle.dataaccess.client.oracleexception] = {"ora-01843: not valid month"}

mm/dd/yyyy should encased in quotes - 'mm/dd/yyyy'. oracle string. if date 31/12/2099 format string should 'dd/mm/yyyy'


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -