Loading...

A simple Oracle DB function to convert timestamp to date

In Oracle BRM, all the time and date is stored in number format and it is required to convert them if you are reading it from the DB.
ORacle BRM - VirtualNuggets

Lots of developers write functions or utilities to convert it to date. Here is a similar function:

create
or replace function u2d(v_tstamp IN number)
return date
as
v_date date;

begin
v_date := to_date('01-JAN-1970', 'DD-MON-YYYY') + (v_tstamp+19800)/86400;
RETURN V_DATE;
END;
VirtualNuggets 8996587831269761234

Post a Comment



  1. Great.. Thanks for sharing such an informative post.

    Revenue Management Software

    ReplyDelete

  2. Thanks for the nice blog here.I was searching this one for a long time.This blog is very helpful for my studies..I got another one site also,which is same as yours Oracle BPM.Check this one also Oracle Fusion HCM Sure it will be helpful for you too..Once more iam thanking you for your creative blog.

    ReplyDelete

emo-but-icon

Home item

Blog Archive

Popular Posts

Random Posts

Flickr Photo