Re: Time problem
"Avinash Shivani" <[email protected]>
| Newsgroups | gmane.comp.db.oracle.devel,gmane.spam.detected |
|---|---|
| Message-ID | <LYRIS-1796914-787328-2002.12.02-16.37.49--gcdod-oracle#[email protected]> |
dear friend,
I think following sql can help you in finding time diff in min and
seconds.
for diff. in minutes:
select (totime - fromtime)*24*60 from tbl;
for diff. in seconds
select (totime - fromtime)*24*60*60 from tbl;
regards,
Avinash
On Mon, 02 Dec 2002 [email protected] wrote :
>
>if you minus one date field from one other then you get the time
>difference
>in days.
>
>like this
>
> 1* create table mydates ( xxx date)
>SQL> /
>
>Table created.
>
>SQL> insert into mydates values ( to_date('02-dec-2002
>09:55','dd-mon-yyyy
>hh24:mi'));
>
>1 row created.
>
>SQL> select sysdate - xxx from mydates;
>
>SYSDATE-XXX
>-----------
> -.00407407
>
>
>then you can do some formating on the number returned
>
>
>
>
>
> waseem altaf
> <[email protected]. To:
>"Oracle" <[email protected]>
> pk> cc:
> Subject:
>[oracle] Time problem
> 30/11/2002 07:22
> Please respond to
> "Oracle"
>
>
>
>
>
>
>hi
> i am new to oracle. how i get the difference between two time
>in query.
> if two field "fromtime" and "totime" store the time corecectly
>and field
>type is date. but problem is how i get the difference between two
>time any
>seggestion or code
> thanks
>
>
>_____________________________________________________________
>Get 100% private, FREE email for life!
>Visit http://inbox.com.pk
>
>_____________________________________________________________
>Select your own custom email address for FREE! Get
>[email protected] w/No
>Ads, 6MB, POP & more!
>http://www.everyone.net/selectmail?campaign=tag
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to %%email.unsub%%.
>
>
>
>
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or
>to unsubscribe send a blank email to
>%%email.unsub%%.
________________________________________________________________
NIIT supports World Computer Literacy Day on 2nd December.
Enroll for NIIT SWIFT Jyoti till 2nd December for only Rs. 749
and get free Indian Languages Office software worth Rs. 2500.
For details contact your nearest NIIT centre, SWIFT Point
or click here http://swift.rediff.com/
---
Change your mail options at http://p2p.wrox.com/manager.asp or
to unsubscribe send a blank email to [email protected].