MindFusion.Reporting for Silverlight Programmer's Guide
DateAdd

Returns a date to which a specified time interval has been added.

Syntax

 Copy Code

DateTime DateAdd (
    string type,
    double count,
    DateTime date
)

Parameters

type
A string expression that defines the type of units to add.
count
A numeric expression that specifies the number of units to add. This expression can either be positive, to perform addition, or negative, to perform subtraction.
date
A DateTime value to which the units are added.

Settings

The type parameter can have one of the following values:

Parameter Value

Description

y

The value of count represents the number of years to add or subtract from date.

m

The value of count represents the number of months to add or subtract from date.

d

The value of count represents the number of days to add or subtract from date.

h

The value of count represents the number of hours to add or subtract from date.

n

The value of count represents the number of minutes to add or subtract from date.

s

The value of count represents the number of seconds to add or subtract from date.

Remarks

You can use the DateAdd function to add or subtract a specified time interval from a date.

See Also

Date & Time Functions
DateDiff Function
DatePart Function