Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Calculation in Query

Status
Not open for further replies.

joanp

MIS
Jul 27, 2000
5
US
Hi,

I'm trying to return the number of days between SYSDATE and EFFDT in an expression in PS Query.

I've tried:
sysdate - a.effdt
to_char(sysdate,'yyyy-mm-dd') - a.effdt
and
to_number(to_char(sysdate,'yyyy-mm-dd')) - to_number(a.effdt)

All return error msg:
SQL error. Stmt #: 4433 Error Position: 0 Return: 1722 - ORA-01722: invalid number

Does anyone know how I can perform this calculation in Query?

Thanks very much, in advance!

Regards,
Joan

 
Never mind... I found it!

%DateDiff(A.EFFDT,SYSDATE)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top