riverphoenix

在DB2中的Date 一共识别三种格式,最常见的是这样

\'2013-12-12\'

  对,你没看错,DB2认为这样的字符串就是Date数据

然后我们可以利用函数这样寻找日期区间

select * from users where g_time between \'2003-05-04 \' and \'2003-05-08\'

也可以利用操作符来进行常规的日期大小比较

select * from users where g_time >= \'2003-05-04 \' 

  这篇文档更加详细http://www.cnblogs.com/wanghonghu/archive/2012/05/25/2518604.html

 

posted on 2014-07-31 19:43  riverphoenix  阅读(10897)  评论(0编辑  收藏  举报

分类:

技术点:

相关文章:

  • 2022-01-12
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-09-26
  • 2021-11-23
  • 2022-12-23
  • 2021-09-20
  • 2021-09-19
  • 2021-07-03
  • 2021-10-10
相关资源
相似解决方案