I am having trouble converting a Julian date back to a normal calendar date.
If I get the Julian Day for today:
Code: Select all
dbadmin=> SELECT sysdate, julian_day(sysdate);
sysdate | julian_day
----------------------------+------------
2013-03-22 09:04:29.667331 | 2456374
(1 row)
Code: Select all
dbadmin=> SELECT to_date(2456374, 'J');
ERROR 3457: Function to_date(int, unknown) does not exist, or permission is denied for to_date(int, unknown)
HINT: No function matches the given name and argument types. You may need to add explicit type casts