java postgresql

Hi, when i get the value from a column set as Date type in postgresql, i get it as yyyy-mm-dd the thing is that i want to get the date as mm-dd-yyyy, using netbeans and the pgadminIII i can get the data as mm-dd-yyyy. How can i get the date as mm-dd-YYYY i use in my java class something like this for getting values from the database:

ResultSet res = conexion.select("select " +

"cod_dependencia, " +

"nom_dependencia," +

"est_dependencia," +

"fec_registro," +

"cod_usuario" +

" from \"public\".\"dependencias\" ");

What should i do?

[765 byte] By [pompeighuIIa] at [2007-11-27 7:34:52]
# 1
Use the getDate method of ResultSet when retreiving the Date (rather than the getString method), then use SimpleDateFormat and format the date any way you want.Refer to the API for ResultSet and SimpleDateFormat for more information.
masijade.a at 2007-7-12 19:15:22 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
thanks, problem solved!.
pompeighuIIa at 2007-7-12 19:15:22 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...