Function to Update Field

Function to Update Field

I would like to create a function that calculates age in days from a known field and then populates the information into another field.

The formula for calculating the field would be:

Abs((Datecomp(${Design Requests.Date Submitted},Now())/1440))


My question is how do I create the function and implement it on a schedule so that it updates those values every night for reporting purposes?


Also, only records in a specific stage would need the calculation done.