AddYears
4 min
returns the utc date and time for the year that is the number of years specified earlier than or later than the specified date and time syntax addyears(numyears, basedatetime, 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 yes 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 yes parameter parameter description numyears (optional) the number of intervals if not specified, uses the default interval which is 0 can be either a positive integer, to indicate years in the future, or a negative integer, to indicate years in the past basedatetime (optional) the base date for the function if not specified, uses the default date which is the current date and time timezone (optional) the time zone, in iana format return value datetime value in utc time if the application has to display the return value, it implicitly converts it to text, thereby allowing the display format to change depending on your culture code see available languages and cultures docid\ lvpbgqv5z08mcuzy43ky3 for a list of the culture codes used by example $(addyears(3)) if today is april 10, 2014, this function returns the datetime value for april 10, 2017 $(addyears( 1)) if today is april 10, 2014, this function returns the datetime value for april 10, 2013 $(addyears(5, mydate)) if the value of the mydate parameter is april 10, 2014, this function returns the datetime value for april 10, 2019 at the same time of day
