Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6101249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:28:42+00:00 2026-05-23T13:28:42+00:00

I have a large legacy application which calls resultSet.getString(column) and the column it is

  • 0

I have a large legacy application which calls resultSet.getString(column) and the column it is calling on is the DATE format in Oracle. This code worked just fine with Oracle 10g client. It would return the following:

‘2008-05-19 10:03:56.0’

However, when I use the Oracle 11g client (the server has not changed) it gives the following:

‘2008-05-19 10:03:56’

Now, I know the right way to fix this is by changing the code to NOT use getString for a date function, but it’s a ton of code and we are trying to do this without having to do code changes.

Is there any configuration parameter(s) I can use to fix this on the Oracle client side?

I’ve tried the following and it doesn’t even change the format:

Statement stmt = conn.createStatement();
stmt.execute("alter session set nls_date_format = 'YYYY-MM-DD HH24:MI'");

This one took off the seconds, but when running a query it is still using the one with seconds. So I don’t think the NSL_DATE_FORMAT update will work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:28:43+00:00Added an answer on May 23, 2026 at 1:28 pm

    The thread below seems to indicate that the date format is hard coded in the jdbc drivers:

    Java: ResultSet getString() differs between environments

    If that is true then the only solutions seem to be:

    1. Change all the code to use getDate()

    2. Change all the queries to use to_char(date, ‘YYYY-MM-DD HH24:MI:SS.F’)

    Does anyone see any other solution?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a large amount of legacy C++ code in shared libraries that are
I have a large chunk of legacy php code that I need to interface
I have a large legacy C++ project compiled under Visual Studio 2008. I know
I have a large tree of Java Objects in my Desktop Application and am
I have a large text template which needs tokenized sections replaced by other text.
I have a large ARFF file with data that looks something like this: 555,2011-03-13
I have large data sets (10 Hz data, so 864k points per 24 Hours)
I have large batches of XHTML files that are manually updated. During the review
I'm developing a website in PHP and I have large JS files that I
I have a large codebase that targetted Flash 7, with a lot of AS2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.