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

  • Home
  • SEARCH
  • 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 8095001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:58:45+00:00 2026-06-05T20:58:45+00:00

Which data type in Java can hold just the date and doesn’t require a

  • 0

Which data type in Java can hold just the date and doesn’t require a time component? For example, just to store 12/07/2012. I’m working with persisting the data to/from a database that has a date-only data type, so I’m looking for the best equivalent data type in Java.

  • 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-06-05T20:58:46+00:00Added an answer on June 5, 2026 at 8:58 pm

    from the JDK: java.sql.Date:

    A thin wrapper around a millisecond value that allows JDBC to identify
    this as an SQL DATE value. A milliseconds value represents the number
    of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT.

    To conform with the definition of SQL DATE, the millisecond values
    wrapped by a java.sql.Date instance must be ‘normalized’ by setting
    the hours, minutes, seconds, and milliseconds to zero in the
    particular time zone with which the instance is associated.

    or from JodaTime: DateMidnight or LocalDate (thanks
    @cdeszaq)

    DateMidnight defines a date where the time component is fixed at
    midnight. The class uses a time zone, thus midnight is local unless a
    UTC time zone is used.

    It is important to emphasise that this class represents the time of
    midnight on any given day. Note that midnight is defined as 00:00,
    which is at the very start of a day.

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

Sidebar

Related Questions

How to create a new data type for Go which to can check/validate its
Which data type is apt to represent a decimal number like 10364055.81. If tried
I would like to create a custom data type which basically behaves like an
I got a custom Data type named Student which has marks for 2 subjects.
I have a universal data type, which is passed by value, but does not
Which do the concepts control flow, data type, statement, expression and operation belong to?
I have some prices in my DB which are stored as data type money
I am writing a CUDA kernel in which I'm using the string data type
I would like to be able to retrieve the data-type , which is a
I have a database column which contains varchar data type. I would like to

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.