Oracle:

1.获取当前日期的年,月,日,时,分,秒

select to_char(sysdate,'yyyy') as nowYear   from dual;   //获取时间的年

  select to_char(sysdate,'mm')    as nowMonth from dual;   //获取时间的月

  select to_char(sysdate,'dd')    as nowDay    from dual;   //获取时间的日

  select to_char(sysdate,'hh24') as nowHour   from dual;   //获取时间的时

  select to_char(sysdate,'mi')    as nowMinute from dual;   //获取时间的分

  select to_char(sysdate,'ss')    as nowSecond from dual;   //获取时间的秒
View Code

相关文章:

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