Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Date calculation...please help...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-03, 02:45
VB_Oracle VB_Oracle is offline
Registered User
 
Join Date: Nov 2003
Posts: 22
Date calculation...please help...

Hi,

I'm trying to find the difference between two dates (w/times) in terms of hours...can someone please modify the below pseudo-query so it does that, thanks.

select (date1 - date2)
from table1;
Reply With Quote
  #2 (permalink)  
Old 12-01-03, 05:44
satish_ct satish_ct is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore, INDIA
Posts: 333
Thumbs up

Hi,

Already you have posted this query in the ORACLE Forum.
__________________
SATHISH .
Reply With Quote
  #3 (permalink)  
Old 12-02-03, 08:09
shelva shelva is offline
Registered User
 
Join Date: Nov 2003
Location: Rotterdam, Netherlands
Posts: 127
u have to use it like this

select (date2-date1) * 24 * 60 from !!!! to get in minutes

because date2-date1 gives u a value in number of days..
multiply it by 24 gives you number of hours
multiply it by 24 * 60 gives you number of minutes
multiply it by 24 * 60 *60 gives you number of seconds

regards
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On