yangyx

说明:数据库的字段为日期类型

操作:

第一种方式将字符串日期转换成date类型,用到函数to_date,方式如下:

select d.s_info_windcode from CBONDDESCRIPTION d where d.is_failure =   0 and 

and opdate = to_date(\'2018/12/26 11:06:29\',\'yyyy/mm/dd hh24:mi:ss\')

第二种方式将字段转换成字符格式,用到函数to_char,方式如下:

select d.s_info_windcode from CBONDDESCRIPTION d where d.is_failure =   0 and 

and to_char(opdate,\'yyyymmdd hh24:mm:ss\') = \'20181226 11:06:29\'

 

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-11-23
  • 2021-12-06
  • 2021-11-18
  • 2021-11-17
  • 2021-11-05
  • 2021-11-05
  • 2021-10-08
猜你喜欢
  • 2021-11-15
  • 2021-12-23
  • 2021-11-05
  • 2021-12-07
  • 2021-12-23
  • 2018-04-03
  • 2021-09-21
相关资源
相似解决方案