SubDay Question

SubDay Question

Greetings all...

I am using the following to determine a date in a script:

input.email_reminder_date = rec.weeklyworship_worshipdate.subDay(churchinfo.reminder_email_days);

Where churchinfo.reminder_email_days is a collection pulled from a table where reminder_email_days is of field type numeric.  When I put in specific number:

input.email_reminder_date = rec.weeklyworship_worshipdate.subDay(4);

It works fine, but when I use the code referencing the variable for the subDay it throws an error message.  I assume this is a field type error as the error states:

Error evaluating DateTime expression

Any thoughts on correcting this?

Thanks,

Joel