我已經使用fnd_date.canonical_to_date
將列轉換爲日期數據類型。fnd_date.canonical_to_date函數不能在oracle中工作
the expected output is for example:29-JAN-2014
but i am getting : 29-JAN-0014
有人知道爲什麼嗎?
l_actual_term_date varchar2(100);
SELECT to_char(ACTUAL,'DD-MON-RRRR')
INTO l_actual_term_date
FROM per_table;
--assign to another variable as per reqmt of date type
prev_term_date :=l_actual_term_date;
--WHEN printed this will give 29-JAN-12
--then in another package have to aasign prev_term_date to a varchar type variable
P_prev_term_date :=fnd_date.canonical_to_date(prev_term_date);
--when i print this P_prev_term_date i get - 29-JAN-0014 instead of 29-JAN-2014
你能告訴你如何使用'canonical_to_date'嗎?和相關的數據,所以我們可以嘗試重現您的問題。 – 2014-09-28 16:49:24
@SylvainLeroux done-pls checkand tell – user3809240 2014-09-28 17:43:55
代碼沒有出現任何問題。您可以嘗試將「RRRR」更改爲「YYYY」並查看是否有所作爲,但這可能是從表格中選擇「實際」值的問題。 – 2014-09-29 06:38:29