9i下,为什么也不行呀? SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ssxff') from dual;select to_char(sysdate,'yyyy-mm-dd hh24:mi:ssxff') from dualORA-01821: 日期格式无法识别
我的是8i的 字段存的就是2004/11/26-08:39:00:000 是var2 to: ORARichard(没钱的日子好难过啊) select to_char(to_date(EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss'),'IW') as weeknum, count(act_shpmtno) as totalnum from T2AShipmentNo_KPI where t2ashipmentno_kpi.ACT_SHIPFROM_TYPE='BASIC' and t2ashipmentno_kpi.ACT_PROJECTTYPE='C' and to_date(t2ashipmentno_kpi.EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss') between to_date('2004-09-24','yyyy-mm-dd') and to_date('2004-10-26','yyyy-mm-dd') group by to_char(to_date(EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss'),'IW') 出现"日期格式图片在转换整个字符之前结束" 错误
select to_char(to_date(substr(EDI_ESTarr,1,19),'yyyy/mm/dd-hh24:mi:ss'),'IW') as weeknum, count(act_shpmtno) as totalnum from T2AShipmentNo_KPI where t2ashipmentno_kpi.ACT_SHIPFROM_TYPE='BASIC' and t2ashipmentno_kpi.ACT_PROJECTTYPE='C' and to_date(substr(t2ashipmentno_kpi.EDI_ESTarr,1,19),'yyyy/mm/dd-hh24:mi:ss') between to_date('2004-09-24','yyyy-mm-dd') and to_date('2004-10-26','yyyy-mm-dd') group by to_char(to_date(substr(EDI_ESTarr,1,19),'yyyy/mm/dd-hh24:mi:ss'),'IW')
http://www.cnoug.org/viewthread.php?tid=18438
SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ssxff') from dual;select to_char(sysdate,'yyyy-mm-dd hh24:mi:ssxff') from dualORA-01821: 日期格式无法识别
字段存的就是2004/11/26-08:39:00:000 是var2
to: ORARichard(没钱的日子好难过啊) select to_char(to_date(EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss'),'IW') as weeknum, count(act_shpmtno) as totalnum from T2AShipmentNo_KPI where t2ashipmentno_kpi.ACT_SHIPFROM_TYPE='BASIC' and t2ashipmentno_kpi.ACT_PROJECTTYPE='C' and to_date(t2ashipmentno_kpi.EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss') between to_date('2004-09-24','yyyy-mm-dd') and to_date('2004-10-26','yyyy-mm-dd') group by to_char(to_date(EDI_ESTarr,'yyyy/mm/dd-hh24:mi:ss'),'IW')
出现"日期格式图片在转换整个字符之前结束" 错误
每次你都救我,真是感谢。