Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-29531 Error - and the method is declared both PUBLIC and STATIC
jfk2001 wrote:
> Rauf,
>
> Thank you very much for responding to my initial request for
> assistance. I made the suggested changes, and unfortunately I still
> get
> the ORA-29531 error. Do you have any other ideas of what may be
> causing the issue?
>
> Regards
>
> Jeff
SQL> CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED
"TimeZoneFormatter" AS
2 import java.util.TimeZone;
3 // import java.util.Date;
4 import java.sql.Date;
5 import java.text.DateFormat;
6
7 public class TimeZoneFormatter {
8
9 public static String Convert(String clientTimezone, Date
clientDate)
10 {
11 //set the format for the dates
12 DateFormat dateFormatter =
13 DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG);
14 TimeZone timeZoneClient = TimeZone.getTimeZone(clientTimezone);
15 // Set the time zone of the date formatter to Client time zone.
16 dateFormatter.setTimeZone(timeZoneClient);
17
18 return dateFormatter.format(clientDate);
19
20 }
21 }
22 /
Java created.
SQL> CREATE OR REPLACE function TimeZoneFormatter (ClientTimezone
varchar2,
2 ClientDate Date)
3 -- ClientDate varchar2)
4 return varchar2 as
5 language java
6 -- name 'TimeZoneFormatter.Convert(java.lang.String,
java.lang.String)
7 name 'TimeZoneFormatter.Convert(java.lang.String, java.sql.Date)
8 return java.lang.String';
9 /
Function created.
SQL> select TimeZoneFormatter('Europe/Paris', sysdate) from dual;
TIMEZONEFORMATTER('EUROPE/PARIS',SYSDATE)
SQL>
Regards
/Rauf
Received on Mon Mar 14 2005 - 11:22:04 CST
![]() |
![]() |