SELECT to_char(SYSDATE, 'HH24Q:MI:SS') FROM dual;
SELECT to_char(SYSDATE, 'HH24W:MI:SS') FROM dual;在小时后面加上字母“Q”和“W”,不会出错,是什么意思?

解决方案 »

  1.   

    Q                   Quarter of year (1, 2, 3, 4; JAN-MAR = 1)
    W                   Week of month (1-5) where week 1 starts on the first 
                        day of the month and ends on the seventh. 
      

  2.   

    SELECT to_char(sysdate, 'yyyymmdd Q-W HH24:MI:SS') FROM dual; 
    Q、W的作用跟hh、mi、ss、yyyy、mm、dd都是一样的。