Does anyone know how to update a field based on the current date instead of some user action (i.e. changing status...)?

I am attempting to create some code that would calculate a number of days that have passed since a defect was opened (based on the current day, so that I can automatically identify defects that have missed specific SLA's.

Any suggestion will be greatly appreciated! Thanks.