TrackStudio Enterprise 3.5
Example 5

To return the number of days since the last update (this field can be used to find out what tasks have been neglected for a long time), use the following Task / Custom Field Value script:

return ((new java.util.Date()).getTime() - task.getUpdatedate().getTime().getTime())/DAYS;

Associated custom field properties:

Property 
Value 
Type 
Integer