lwh-12345

Oracle中如何获取系统当前时间


 原文链接:https://blog.csdn.net/qq_26483671/article/details/79762338


select to_char(sysdate,\'yyyy-mm-dd hh24:mi:ss\') from dual; 
 
ORACLE里获取一个时间的年、季、月、周、日的函数 
select  to_char(sysdate, \'yyyy\' )  from dual; --年 
 
select  to_char(sysdate, \'MM\' )  from dual; --月 
select  to_char(sysdate, \'dd\' )  from dual; --日 
select  to_char(sysdate, \'Q\')  from dual; --季 
select  to_char(sysdate, \'iw\')  from dual; --周

 

//时间格式化方法

to_date(\'2009-12-25 14:23:31(时间)\',\'yyyy-mm-dd,hh:mi:ss\'(格式))


分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-11-18
  • 2021-12-27
猜你喜欢
  • 2021-11-18
  • 2021-07-01
  • 2021-07-12
  • 2021-12-18
  • 2022-12-23
  • 2021-07-29
  • 2022-12-23
相关资源
相似解决方案