Last post Oct 24, 2013 10:17 PM by RichardY
Oct 24, 2013 07:11 PM|mikeganem|LINK
I have a textbox that takes a date (sStartDate) and I am trying to pass that date to my Oracle procedure but getting the following error:
ORA-01861: literal does not match format string
How do I fix it?
sStartDate = txtStartDate.text;
DateTime date = DateTime.Parse(sStartDate);
objCmd.Parameters.Add("start_date", OracleType.DateTime).Value = date.ToString("dd-MMM-yy");
Oct 24, 2013 10:17 PM|RichardY|LINK
objCmd.Parameters.Add("start_date", OracleDbType.Date).Value = date;
Assuming that you are using the parameter to compare to a date column.