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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of cdSpecialDateRange function?

Status
Not open for further replies.

HardlyWork

Programmer
Jan 3, 2006
7
US
My first time at trying to use one of the Custom Functions, can someone tell what is wrong with the use of the function below, I've tried several versions of the code below. This last version gives me an error poiting to the SYSTEM_DATES.PROCESS_DATE saying: "a date is expected here" when it is a date in the table(Oracle 10g & CR9):

{DISBURSEMENTS.ACTUAL_DISB_DATE} in cdSpecialDateRange ({SYSTEM_DATES.PROCESS_DATE}, LastFullMonth)

Thanks!!!
 
if the ({DISBURSEMENTS.ACTUAL_DISB_DATE} or {SYSTEM_DATES.PROCESS_DATE} are datetime fields that might give you a problem, also the last part must be text so you should use the double quotes ""

try
date({DISBURSEMENTS.ACTUAL_DISB_DATE}) in cdSpecialDateRange (date({SYSTEM_DATES.PROCESS_DATE}), "LastFullMonth")


Mo
 
Thanks for the reply,

this is how I got it to work: {DISBURSEMENTS.ACTUAL_DISB_DATE} in cdSpecialDateRange (currentdate - {?days-off}, "LastFullMonth").

I had to use the currentdate function and adjust it by "days-off" to get to the date I wanted since I can't use the date that is in the table. The date in the table was a request date anyway, I'll now request the number of offset days rather than a date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top