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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T11:58:11+00:00 2026-06-09T11:58:11+00:00

Which data type is used to store date time (not only date but also

  • 0

Which data type is used to store date time (not only date but also time) in Oracle 10g database? I have read some where that (may be mistakenly) “the Date data type in Oracle 10g can store date time” but the thing doesn’t seem to happen when I try to do so.

The DATE datatype is a datetime datatype. It stores a date and a time.
The date portion is based on the number of days since January 1, 4712
BC. The time portion is based on the number of seconds since
mid-night. The link

I tried it through Java as a front-end and directly on the Oracle terminal using the following SQL.

insert into discount 
values(7, 'Code', 12.5, to_date('11-AUG-2012 06:05:23', 'dd-mon-yyyy hh:mi:ss'), 
to_date('20-AUG-2012 07:50:23', 'dd-mon-yyyy hh:mi:ss'))

It works but (in both the cases) Oracle simply ignores the time portion and inserts only the dates specified in the SQL without any error?

Which data type is used to store date time in Oracle 10g? Is it TimeStamp?

  • 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-09T11:58:13+00:00Added an answer on June 9, 2026 at 11:58 am

    A DATE in Oracle always has a day component and a time component. Assuming the last two columns in the DISCOUNT table are declared as DATE, it is terribly unlikely that Oracle is simply ignoring the time component.

    What makes you believe that the time component is being ignored? My guess is that you are checking the data by running a query like

    SELECT *
      FROM discount
    

    from SQL*Plus, SQL Developer, TOAD, or some other GUI. If you do that, by default, the date that is displayed will only have a day component and not a time component That does not mean that the time component is being discarded. Instead, it is the result of having a default NLS_DATE_FORMAT that doesn’t display the time component. You can force the time component to be displayed by doing an explicit TO_CHAR in your query, (note that I’m guessing at the names of your columns)

    SELECT discount_id, 
           discount_type, 
           discount_amt, 
           to_char( discount_start_date, 'MM/DD/YYYY HH24:MI:SS' ),
           to_char( discount_end_date, 'MM/DD/YYYY HH24:MI:SS' )
      FROM discount
    

    Or by changing your default NLS_DATE_FORMAT

    ALTER SESSION SET nls_date_format = 'MM/DD/YYYY HH24:MI:SS';
    SELECT *
      FROM discount;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a universal data type, which is passed by value, but does not
I have a data table in SQL 2008 R2 which is used to store
Which data type in Java can hold just the date and doesn't require a
I have some prices in my DB which are stored as data type money
I have an int(11) column which is used to store money. I read some
I want to store and retrieve images to/from database using java beans, which data
I have this much: A table which used to store the Folders. Each folder
I have a TreeStore, which works fine, but every node has some nested data,
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

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.