Xavior2K3
asked on
Using Date Functions (date_add, date_sub) With Fields Instead of Constant Values
Hi,
I want to subtract a number of days from a date. Both the date and the number of days are stored in a record but I cant figure out how to use the DATE_ADD and DATE_SUB functions using fields and not constant values. I basically need:
DATE_SUB(table.date_field, INTERVAL table.number_of_days DAY)
But this doesn't work. How can this be done?
Thanks,
Michael
I want to subtract a number of days from a date. Both the date and the number of days are stored in a record but I cant figure out how to use the DATE_ADD and DATE_SUB functions using fields and not constant values. I basically need:
DATE_SUB(table.date_field,
But this doesn't work. How can this be done?
Thanks,
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER