LISTSERV Maestro 11.1-2 Help Table Of Contents

Calculation Formulas

Back to Calculation Formulas Overview
Back to Functions Overview


Function "NextAnniversary"

NextAnniversary(referencedate, historicdate)

Function: Determines the date/time of the next anniversary of the given historic date, after the given reference date, represented in milliseconds since "Jan. 1st 1970, 00:00:00 GMT".

Return-Type: Number

Arguments:
referencedate - Type Number: The date/time value of the reference date. Must contain the desired reference date/time represented as milliseconds since "Jan. 1st 1970, 00:00:00 GMT" (for example from the output of the functions "CurrentMillis", "SubscribeTimeMillis", "ToMillis", and "LastMidnightMillis").

historicdate - Type Number: The date/time value of the historic date. Must contain the desired historic date/time represented as milliseconds since "Jan. 1st 1970, 00:00:00 GMT" (for example from the output of the functions "CurrentMillis", "SubscribeTimeMillis", "ToMillis", and "LastMidnightMillis").

Examples:
NextAnniversary(CurrentMillis, ToMillis(&BIRTHDAY;, "yyyy-MM-dd"))
(uses a person's birthday date from the field &BIRTHDAY;, parsed as a milliseconds value, as the historic date and the current date/time as the reference date and therefore calculates the date/time of the person's next birthday after today)

NextAnniversary(CurrentMillis, ToMillis("10/24/1945", "MM/dd/yyyy"))
(uses the date 24th October 1945 - the founding day of the United Nations - as the historic date and the current date/time as the reference date and therefore calculates the date/time of the next anniversary of the founding of the United Nations after today)

© 2002-2023 L-Soft Sweden AB. All rights reserved.