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 5970231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:20:42+00:00 2026-05-22T20:20:42+00:00

My data is in format: 2010-12-01 09:59:00.423 getDate in Java only returns the date

  • 0

My data is in format:

2010-12-01 09:59:00.423

getDate in Java only returns the date portion. Is there a way to also extract the time?

  • 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-22T20:20:43+00:00Added an answer on May 22, 2026 at 8:20 pm

    The SQL DATE type indeed only contains the date portion, not the time. But your column is apparently of TIMESTAMP type, so to get the full timestamp, use ResultSet#getTimestamp() instead.

    Date date = resultSet.getTimestamp("columnname");
    // ...
    

    It returns java.sql.Timestamp which is a subclass of java.util.Date, so the upcast is safe.

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

Sidebar

Related Questions

I'm developping a xml data format. Besides other data there should be a xaml
i have data in following format: colA colB 2010 10 2010 20 2010 30
I have the following date format 28 Aug 2010 17:40:58 +0000 Can anyone suggest
I'm sending a date to my webservice in this format: 12/14/2010 but the /
I'm sending a date to my webservice in this format: 12/14/2010 but the /
I am geting the data in this format . {items:[[Jan 1, 2010,1],[Jan 2, 2010,2]]}
I have a date field stored in the format 16/08/2010 17:17 I am attempting
I have Following dummy table with data: ACID srno date(mm/dd/yyyy) name 3 1 04/12/2010
I have a log table with the following format (and sample data): date |
I have date of Birth of the format 04/08/2010(DD/MM/YYYY) and sql server store of

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.