Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple Date/time question.

Re: Simple Date/time question.

From: Medic Alert <news_at_medicalert.org>
Date: 1997/03/18
Message-ID: <332EC622.100C@medicalert.org>#1/1

Force12 Solutions Ltd wrote:
>
> I understand you can have a combined date/time field in an Oracle
> table. Is this true? If so, what format should the values be entered in?

All columns of type DATE in Oracle include the time. When the time is not specified, it defaults to midnight, i.e. the first second of the day.

> I know the date goes in as '01-Jan-97'but I can't get a time to go in.

Typically you use a TO_DATE function to specify the time as well. The following statement, for example, would insert the following date and time: March 18, 1997 8:14am

INSERT INTO myTable (theDate)
VALUES ( TO_DATE('18-MAR-1997 08:14','DD-MON-YYYY HH24:MI') ); Remember people! The year 2000 is getting close! Get used to using YYYY EVERYWHERE or you'll get burned.

Received on Tue Mar 18 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US