Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> equivalent DataDiff function?

equivalent DataDiff function?

From: <wykoff_at_my-deja.com>
Date: Thu, 24 Jun 1999 15:13:40 GMT
Message-ID: <7kthup$8dc$1@nnrp1.deja.com>


Hi,

I'm converting a report generating application from using SQL Server to Oracle. The SQL contains a call to the DateDiff function and selecting only rows where the difference is under a specified time.

It seems that Oracle 7.3.4 is really lean on the date (and string) functions it provides. I looked at MONTHS_BETWEEN, but for my application it will allow too wide of a range of dates. This is the only function I saw that calculates a difference.

If you know of more date functions, please let me know.

In the meantime I'm trying to write my own function. I was hoping that by assigning the date to a long, the date would be 'implicitly' transformed to a long, then I could do arithmetic on the dates to get the difference. Unfortunately what seemed to happen is that my longs got transformed into dates and I could no longer do arithmetic on them although they did print out nicely in the default time format (argghh).

Also, from the lack of documentation about arrays, I'd have to assume that PL/SQL doesn't allow for arrays aside from those meant for row retrieval.

Does anyone think that PL/SQL is good? :)

Thanks,
kim

ps: sorry if this got posted twice, but my usual new server seems to not be working well.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Jun 24 1999 - 10:13:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US