ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
Hi Venkata,
You can use - (Minus) between two Time stamps to find out the difference. The result will be in the form of seconds. If you want to convert it into days,months or years we can use some calculation.
Eg: select CRTTMSTP,current timestamp,current timestamp-CRTTMSTP
from user.table;
(It returns the difference between current time stamp and create time stamp in seconds)
select CRTTMSTP,current timestamp,(current timestamp-CRTTMSTP)/(60*60*24) from user.table;
(It returns the difference between current time stamp and create time stamp in days)
Thanks,
Reddy. |
|