RelativeDate
4 min
returns a text description of the datetime supplied relative to now use this function to get an estimated, easier to understand, description of when something happened (or will happen) for example, if you created an incident 13 days, 6 hours, 42 minutes, and 19 seconds ago, this function returns "2 weeks ago", because that is about 2 weeks ago syntax relativedate(datetime, timezone) enabled for for a description of the business object categories, see notes on "enabled for" docid\ u26v9fecfs6ilwa0 pvjd business object category yes/no business rules before save rules yes business rules calculation rules (after save, with or without also recalculate on load) yes business rules calculation rules (before save or always, without also recalculate on load) yes business rules calculation rules (before save or always, with recalculate on load) yes business rules editing rules yes business rules initialization rules yes business rules read only rules yes business rules required rules yes business rules validation rules yes client expressions yes object permissions no services yes ldap yes mobile yes quick actions (except ui quick actions) yes ui quick actions yes reports yes search/dashboard without field references yes search/dashboard with field references no parameters parameter description datetime a date and time timezone (optional) the time zone, in format return value text value one of the following, where n is a whole number now n minute(s) ago n hour(s) ago yesterday n day(s) ago n week(s) ago n month(s) ago n year(s) ago n minute(s) from now n hour(s) from now tomorrow n day(s) from now n week(s) from now n month(s) from now n year(s) from now example relativedate(createddate()) if the value of the createddate() function is march 10, 2015 and today is march 27, 2015, this example returns "2 weeks ago" because march 10 is about 2 weeks before march 27 if the value of the createddate() function is september 10, 2014 and today is march 27, 2015, this example returns "6 months ago" because september 10, 2014 is about 6 months before march 27, 2015 if the value of the createddate() function is march 27, 2015 at 11 16am and today is march 27, 2015 at 11 15am , this example returns "now" if the value of the createddate() function is may 25, 2015 and today is march 27, 2015, this example returns "2 months from now" because may 25 is about 2 months away from march 27
