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 -> DATE manipulation problem

DATE manipulation problem

From: Dave Harris <daharris_at_erinet.com>
Date: Mon, 2 Dec 2002 23:45:41 -0500
Message-ID: <3dec36f6$0$1456$4c5ecdc7@news.erinet.com>


  I just completed my first class in Oracle and for my final project I built a music CD database. I have a table called "songs" which has the song title and the running time (among other fields) and a table called "album" which links to the "songs" table. I wanted to do a report or a query which would add up all of the running times (which are declared as DATE datatype) for all of the albums in the database and give me a total running time for the each album.
  The teacher suggested I go back and replace the DATE running times with numeric values as he believes you can't manipulate the DATE datatypes. I was wondering if you could somehow convert the running time to a string then use a substring function to pull out the minutes and seconds values to use in the calculation then somehow put the final calculation back into a time format.
  I guess this is a long winded way of asking if the string conversion can work. Even though the class is over I still want to incorporate this in my database program. Any ideas and advice would be greatly appreciated. Thanks in advance!!!!

Dave Harris
daharris_at_erinet.com Received on Mon Dec 02 2002 - 22:45:41 CST

Original text of this message

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