`
sxdtzhaoxinguo
  • 浏览: 214600 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Oracle中如何获取当天时间的最开始的时间和最结尾的时间:

 
阅读更多

如下:

1.获取当前时间的最开始的时间:

select to_char(TRUNC(SYSDATE),'yyyy-mm-dd hh24:mi:ss') from dual;

结果:2013-08-26 00:00:00


2.获取当前时间的最结尾的时间:

selectTRUNC(SYSDATE)+1-1/86400 FROM dual;

结果:2013-08-26 23:59:59

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics