Re: Date datatype

  • From: "Anwar Khudhair" <anwarsk@xxxxxxxxx>
  • To: "Christian Antognini" <Christian.Antognini@xxxxxxxxxxxx>
  • Date: Tue, 5 Apr 2005 10:53:11 -0700

Hi,
> 2.. I'm trying the EXTRACT function. Year, month and
> day worked fine but not the hour, minute and
> second. How can I do it?

It should work. What does it mean "... but not..."? 
If you copy/paste an example it's easier to help you...

To extract the year: Select extract(year from Date_Column) from My_table.

To extract the hour: Select extract(hour from Date_Column) from My_table. May 
be wrong sentance?

> 3.. I tried to add a numeric value from another
> field to a date column and it worked for the
> date. Is it possible to do the same thing with the time?

Yes. E.g. add 1/24 to add one hour... i.e. you should do some math...

As you said 'If you copy/paste an example it's easier to help' me.

Thanks.

HTH
Chris

--
//www.freelists.org/webpage/oracle-l

Other related posts: