ANSI SQL

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Date calculation...please help...

    2 answers - 222 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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;
  • No.1 | | 68 bytes | |

    Hi,

    Already you have posted this query in the ORACLE Forum.
  • No.2 | | 338 bytes | |

    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

Re: Date calculation...please help...


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 2 =
QUESTION ON "ANSI SQL"

DATABASE TECH