DateTime time=Convert.ToDateTime(DateTime.Now.ToShortDateString());
DateTime begin=time.AddDays(-1);
DateTime end=time.AddDays(2);
string str="select * from view_kb_hz where Begin_time1>='"+begin+"' and end_time1<='"+end+"'"; 在oracle中Begin_time1,end_time1是时间格式date。此查询语句出错。ORA-01861: 文字与格式字符串不匹配。select * from view_kb_hz where begin_time1>'2004-7-8'
*
ERROR 位于第 1 行:
ORA-01861: 文字与格式字符串不匹配如果把Begin_time1,end_time1定义为字符串型,虽然查询不出错,但结果不参那样就会出现。2004-7-7>2004-10-7的情况,
DateTime begin=time.AddDays(-1);
DateTime end=time.AddDays(2);
string str="select * from view_kb_hz where Begin_time1>='"+begin+"' and end_time1<='"+end+"'"; 在oracle中Begin_time1,end_time1是时间格式date。此查询语句出错。ORA-01861: 文字与格式字符串不匹配。select * from view_kb_hz where begin_time1>'2004-7-8'
*
ERROR 位于第 1 行:
ORA-01861: 文字与格式字符串不匹配如果把Begin_time1,end_time1定义为字符串型,虽然查询不出错,但结果不参那样就会出现。2004-7-7>2004-10-7的情况,
解决方案 »
- 如何使session不过期?(急)
- 关于datatable
- 关于asp.net 中 access 和sqlserver 通有的问题??
- 同一个JS在html里面可以显示,但是换到aspx里面就不行了
- 请教:如何使用Application变量保存一个类的实例?
- 那位大侠有用.NET实现的QQ如下所示的面板菜单,给给思路也行!!!!
- 请教关于OWC中SeriesCollection集合的问题???
- 发布一款webword控件。
- 求助asp.net网站修改cs代码后如果不重新生成就起效果?
- 高分求救!!关于批量输入的问题。
- // 这个方法先用ArrayList存储id。再转换成int[]。有没有其它类能你ArrayList一样能Add.又能直接转换为int[]
- .net 下可以使用xhtml吗?
from table_anme
where operate_date >=to_date(:date1,'dd-mm-yyyy') and operate_date <=to_date(:date2,'dd-mm-yyyy')
select * from view_kb_hz where begin_time1>to_date('2004-7-8','yyyy-mm-dd')
以上语句在执行时提示OCI-22053: 溢出错误