-
Hello,
I need to translate this instruccion in C language
to PL/SQL :
localtime();
"The localtime() function shall convert the time in seconds since the Epoch (January 1, 1970 0:00 UTC) pointed to by timer into a broken-down time, expressed as a local time. The function corrects for the timezone and any seasonal time adjustments. "
Thanks in advance.
-
Since you did not say what version of Oracle you are using I'm going to assume 9i.
I have not tested this, but it should get you on the right track.
declare
epoch timestamp with time zone;
other_date timestamp with time zone;
interval number;
begin
interval := 1000000000;
epoch := timestamp '1970-01-01 00:00:00.000000 GMT';
other_date := epoch + interval / 3600 / 24;
dbms_output.put_line(to_char(other_date));
end;
/
--
Paul
-
In Oracle 8 is possible ?
In Oracle 8 is possible ?
-
You could use the date type instead of timestamp. If you do this you will have to handle timezones in your code.
--
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|