例如:1998/09/21

to_number(substr(hiredate,0,4))  ,这个方法只可以把年份变为数字

获取系统时间:
select to_char(sysdate,'yyyy-mm-dd') from dual

to_char函数的用法:将数值型或者日期型转化为字符型

TO_CHAR(date,’格式’);

TO_CHAR(number, '格式')

TO_CHAR(salary,’$99,999.99’)

 

相关文章:

  • 2022-02-19
  • 2021-05-31
  • 2021-11-18
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
  • 2022-12-23
相关资源
相似解决方案