VDA-CreateDateList()

This function takes a list a consisting of date pairs (from/until) and optional amounts and creates a new list b containing dates according to the VDA specification (e.g. for VDA 4905). If ranges are given, the VDA separator "555555" will be added to the list. The resulting list will start with single dates, followed by the VDA separator "555555" and the ranging dates (if present).

The result of the function is the number of date values in the list. With a list containing amounts, this will be the number of entries divided by 2, otherwise the number of values.

Parameters


Parameter

Description

a

Name of the list containing dates and amounts. See examples.

b

(optional) Name of the list for the result (or empty if the same list should be used).

c

(optional) "true" if amounts are not in the list. Default: "false".


Examples


Important note: When specifying a range, you must always specify a complete week (Monday through Sunday) or a complete month (first through last day of the month).

Given are the following lists:


  • "DatesWithAmounts" with values {2013-10-01,2013-10-01,10,2013-11-01,2013-11-30,30,2013-10-03,,20}.

  • "OnlyDates" with values {2013-10-01,,2013-10-07,2013-10-13}.

  • "OnlyFixDates" with values {2013-10-01,,2013-10-07,2013-10-07}.

  • "SingleDate" with values {2025-02-05,2025-02-05}.

  • "WrongRangeWeek" with values {2025-02-10,2025-02-15}.

  • "WrongRangeMonth" with values {2025-02-01,2025-02-27}.


Parameter a

Parameter b

Parameter c

Result

DatesWithAmounts

NewList

false

Return value "4" and list "NewList" with values {131001,10,131003,20,555555,0,131000,30}.

DatesWithAmounts

NewList

true

Abortion with error because the number of values in the list is not a multiple of 3.

OnlyDates

NewList

false

Abortion with error because the number of values in the list is not a multiple of 2.

OnlyDates

NewList

true

Return value "3" and list "NewList" with values {131001,555555,130041}.

OnlyFixDates

NewList

true

Return value "2" and list "NewList" with values {131001,131007}.

SingleDate

NewList

true

Return value " 1" a nd list " NewList" with the value { 250205 }.

WrongRangeWeek

NewList

true

Abortion with error because no complete week has been specified as range. A correct range would be {2025-02-10,2025-02-16}.

WrongRangeMonth

NewList

true

Abortion with error because no complete month has been specified as range. A correct range would be {2025-02-01,2025-02-28}.