Sets all dates between the from date and until date to zero is no value has been specified for those dates.

Syntax

Smartsite SXML CopyCode image Copy Code
smidata.setmissingdatestozero(datatable table, string dateColumnName, string valueColumnName, datetime fromDate, datetime untilDate)
smidata.setmissingdatestozero(datatable table, string dateColumnName, string valueColumnName, datetime fromDate, datetime untilDate, boolean skipIntermediateResults)

Parameters

Name Data Type Description
table DataTable The datatable in which the missing dates needs to be added.
dateColumnName String The name of the date column. Valid values are "date", "weekdate", "monthdate" and "yeardate".
valueColumnName String The name of the column that contains the values. The values in this column will be set to 0 for all rows that are added by this viper.
fromDate DateTime The start date from which missing dates are added.
untilDate DateTime The end date until which missing dates are added.
skipIntermediateResults Boolean If true, results between the first date and the last date are not set to zero.

Return Value

None.

Expand image Example

SXML