我試圖從格式提取小時和分鐘不工作
2012/12/01 02:03:44
我的代碼的日期爲Extrac小時和分鐘看起來像水木清華
SELECT to_char(t.start_date, 'DD-MON-YY HH24:MI:SS') AS Start_DATE,
to_char(t.resolved_date, 'DD-MON-YY HH24:MI:SS') AS Closed_DATE,
extract(MINUTE FROM TO_TIMESTAMP(t.start_date, 'YYYY/MON/DD HH24:MI:SS')) AS Start_DATE_min,
extract(MINUTE FROM TO_TIMESTAMP(t.closed_date, 'YYYY/MON/DD HH24:MI:SS')) AS Closed_DATE_min,
extract(HOUR FROM TO_TIMESTAMP(t.start_date, 'DD-MON-YYYY HH24:MI:SS')) AS Start_DATE_h,
extract(HOUR FROM TO_TIMESTAMP(t.closed_date, 'DD-MON-YYYY HH24:MI:SS')) AS Closed_DATE_h
FROM t
但在提取領域我只是得到0。
任何想法我做錯了什麼?
什麼不起作用? – Kermit 2014-10-20 14:15:51