Default JDBC date format when reading date as a string from ResultSet

前端 未结 4 1460
鱼传尺愫
鱼传尺愫 2020-12-17 01:37

I\'m looking at some code that basically does the following:

ResultSet rs = ps.executeQuery();
String myDateStr = rs.getString(\"MY_DATE\"); //field is of ty         


        
4条回答
  •  一生所求
    2020-12-17 02:17

    For the Oracle JDBC driver I am using, the format is hard-coded in the driver library, so should only differ across systems if different driver versions are in use.

    See my attempt to get an answer to the same question here: Where is the date format specified when reading a date as a string from JDBC ResultSet.

    (Apologies for asking a separate question, but as your question had been answered multiple times with the ever-helpful "just don't do that" response, I tried again...).

提交回复
热议问题