美文网首页
trunc与日期

trunc与日期

作者: 小狼在IT | 来源:发表于2019-02-14 16:01 被阅读0次

select trunc(sysdate,'DD') from dual
(或者select trunc(sysdate) from dual ) 返回当前年月日
select trunc(sysdate, 'MM') from dual 当月第一天
select trunc(sysdate, 'YYYY') from dual 当年第一天
select trunc(sysdate,'D') from dual 本周第一天(以星期日作为第一天)
select last_day(sysdate) from dual 本月最后一天

相关文章

网友评论

      本文标题:trunc与日期

      本文链接:https://www.haomeiwen.com/subject/vgbeeqtx.html