Home » SQL & PL/SQL » SQL & PL/SQL » I'm trying to get the time difference from 2 column
I'm trying to get the time difference from 2 column [message #208962] Tue, 12 December 2006 14:29 Go to next message
nycjoelb
Messages: 4
Registered: November 2006
Junior Member
Below is my statement.
SELECT DATE_CREATED, FILENAME, SIZE_IN_MB, DATE_MODIFIED
FROM CONTENT

This is my output. Do I use to_char?

DATE_CREATED FILENAME SIZE_IN_MB DATE_MODIFIED
------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------- ----------- ------------------------------------------------------
2006-12-12 11:10:05.820 TVNF1220060000072755_movie_etf_1433783 2732 NULL
2006-12-12 09:51:05.360 TVNF1220060000096087_movie_etf_1433782 2512 2006-12-12 11:15:10.293
2006-12-12 06:42:43.643 NFL_CHI_V_STL_WK14_1433781 528 2006-12-12 07:10:00.160
Re: I'm trying to get the time difference from 2 column [message #208970 is a reply to message #208962] Tue, 12 December 2006 15:26 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
SELECT DATE_CREATED - DATE_MODIFIED
FROM CONTENT
/

Will give you it in days. You can use whatever modifier you want to get it in the unit you want it in.

One has to ask, if someone else posted this for you to read, would you be able to decipher the output? code tags are needed when you want to post code or output so others can read it without getting a headache.

[Updated on: Tue, 12 December 2006 15:27]

Report message to a moderator

Previous Topic: Returning the weeks involved by going back from sydate
Next Topic: trace procedure
Goto Forum:
  


Current Time: Mon Dec 05 02:39:34 CST 2016

Total time taken to generate the page: 0.04301 seconds