MindFusion.Reporting for Silverlight Programmer's Guide
DateSerial

Returns a value of type DateTime for a specified year, month, and day.

Syntax

 Copy Code

DateTime DateSerial (
    int year,
    int month,
    int day
)

Parameters

year
An expression evaluating to a number between 100 and 9999, inclusive.
month
Any numeric expression.
day
Any numeric expression.

Remarks

To specify a date, such as December 31, 1991, the range of numbers for each DateSerial parameter should be in the accepted range for the unit; that is, 1-31 for days and 1-12 for months. However, you can also specify relative dates for each parameter using any numeric expression that represents some number of days, months, or years before or after a certain date.

When any parameter exceeds the accepted range for that parameter, it increments to the next larger unit as appropriate. For example, if you specify 35 days, it is evaluated as one month and some number of days, depending on where in the year it is applied. However, if the date specified by the three parameters, either directly or by expression, falls outside the acceptable range of dates, an error occurs.

See Also

Date & Time Functions
Day Function
Month Function
Now Function