我已经使用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