if you want to insert a date into oracle you don't need to do it in java, just specify the format in your sql statement
e.g.
insert into mytable (date_of_birth)
values(to_date('01/09/1998','MM/DD/YYYY'))
when you extract it:
select to_char(date_of_birth ,'DD-MMM-YYYY')
from mytable
not sure on the oracle date patterns, you'll have to check.
As for doing it in java, I'd personally construct a java.util.Calendar object and set the individual bits, then construct a new string from the Calendar object, but I don't suppose you'll be able to do it without creating an array of month names.
Chris J
|