Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert Unix Timestamp to Date with timezone

Robert SibekMar 29 2019 — edited Mar 30 2019

Hello,

I have a function to convert timestamp since the unix epoch to date format:

create or replace function timestamp_to_date(unix_timestamp integer) return date

as

begin

return TO_DATE('1970-01-01', 'YYYY-MM-DD') + numtodsinterval(unix_timestamp, 'SECOND');

end timestamp_to_date;

This works fine, but it doesn't count with timezones.

So what I'd like to have is the function which convert the Unix timestamp to DATE with timezone ('Europe/Prague')

Thanks for your suggestions,

Sincerely,

Robert

This post has been answered by cormaco on Mar 29 2019
Jump to Answer
Comments
Post Details
Added on Mar 29 2019
10 comments
20,887 views