Re: inserting time values to table

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Mon, 28 Nov 2005 21:42:28 +0100
Message-ID: <438b6bb5$0$675$626a14ce_at_news.free.fr>


"preeti" <shwethanrao_at_gmail.com> a écrit dans le message de news: 1133210333.449809.273550_at_g49g2000cwa.googlegroups.com...
|I have read the contents of those two links...but still not able to
| findout...
|
| For the above mentioned table if I use the following statement to
| insert values
|
| insert into time_slots values(1,'TR',TO_DATE('11:00 AM', 'HH:MI
| AM'),TO_DATE('12:20 PM', 'HH:MI PM'));
|
| when I try to see the values using select * from time_slots..
| It list the values as "28-nov-05"
|
| How should I insert the values?
| Or do I have to change the table definition?
|

As you used to_date to insert the values, you have to use to_char to display them, same format.

Oracle date datatype contains both date and time. There is no time only datatype.

Regards
Michel Cadot Received on Mon Nov 28 2005 - 21:42:28 CET

Original text of this message