Monday, July 21, 2014

A simple Oracle DB function to convert timestamp to date



In 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.
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;

2 comments:

  1. Hi Sachid,

    A very good Blog initiated by you considering very less information is available around oracle brm. could you please connect with me on oraclebillingandrevenue@gmail.com. I am working on brm from last 6-7 years.

    ReplyDelete
  2. Playtech: Where to get the best welcome bonus - Dr MCD
    Playtech's online gaming software is a complete suite 구미 출장샵 of 남원 출장안마 that is, to a certain 인천광역 출장샵 extent, the 계룡 출장샵 games themselves. This 인천광역 출장안마 is not

    ReplyDelete

Migrating PDC data from one system to another

Given System “A” with BRM and PDC and System “B” with BRM and PDC, following is the process for moving new or changed pricing data from ...