Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> About Java Stored Procedure
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
![]() |
![]() |