update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06 00:00:00','yyyy-mm-dd hh24:mi:ss')

解决方案 »

  1.   

    update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06 00:00:00','yyyy-mm-dd hh24:mi:ss');
      

  2.   

    update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06 00:00:00','yyyy-mm-dd hh24:mi:ss')
      

  3.   

    update Web_hnjz_Table_UserInfo set uptodate=to_date('20061106 00:00:00','yyyymmdd hh24:mi:ss')
    根据varchar的时间格式的不同,后面转换的格式也就不同
      

  4.   

    update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06 00:00:00','yyyy-mm-dd hh:mm:ss')
      

  5.   

    update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06 00:00:00','yyyy-mm-dd hh24:mi:ss')
      

  6.   

    在update时,如想把时间精确到天为止,后面的时,分,秒不考虑的情况下,可用这样的命令:
    update Web_hnjz_Table_UserInfo set uptodate=to_date('2006-11-06','yyyy-mm-dd');
    同样,如想精确到月份也行.总之一句话:to_date后面的两个引号里面的格式须相对应,数据库才能正确运行.