【SQL查询】日期的转换_to_date/to_char

1. 日期转换为字符

  select to_char(sysdate,'yyyy-MM-dd HH24:mi:ss') from dual;

2. 字符转换为日期

  select to_date('2003-10-17 21:15:37','yyyy-mm-dd hh24:mi:ss') from dual

posted @ 2017-11-30 13:53  坏脾气  阅读(11143)  评论(0编辑  收藏  举报