Julian date [message #372648] |
Thu, 01 March 2001 18:19 |
M.H
Messages: 3 Registered: March 2001
|
Junior Member |
|
|
My sql is : SELECT * FROM tblContract WHERE endDate < SYSDATE
the field endDate is type of Julian date, so it gives me an error: inconsistent data type. Please show me how to convert from Julian date to date? Thanks.
|
|
|
|
|
Re: Julian date [message #372663 is a reply to message #372661] |
Fri, 02 March 2001 13:16 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi Ramu
You can declare julian date as interger,
and while inserting convert it to a date field.
(Date is strored as binary format in oracle,
and you can display it or pass it in any format you want.)
EX.
create table t1 (id number, mydate date);
declare v_juliandate int;
v_id int;
begin
......
insert into t1(id, mydate) values(v_id, to_date(v_juliandate, 'DDD');
end;
Its always better to store date as date format in oracle table. Its more efficient, as you can use built-in date functions.
Hope this helps
Bala
|
|
|