Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> About Java Stored Procedure

About Java Stored Procedure

From: Sameer <dolpheen_at_gmail.com>
Date: 12 Sep 2006 02:43:05 -0700
Message-ID: <1158054185.234441.168340@h48g2000cwc.googlegroups.com>


One of the fields of a table is having NUMBER datatype. The values stored in this field are the values represented using long number representation of a date. [The long values represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.]

A java function to convert this long value to string is:

static String Long2String(long ldate) {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(ldate);
int day=cal.get(Calendar.DAY_OF_MONTH);
int month=cal.get(Calendar.MONTH)+1;
int year = cal.get(Calendar.YEAR);
String strDate= day+"/"+month+"/"+year;
return strDate;
}

I am new to Java Stored Procedure.
How to use this as a java stored procedure in the database. Can I query the database using this function? -sameer Received on Tue Sep 12 2006 - 04:43:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US