MindFusion.Reporting for Silverlight Programmer's Guide
CDate

Converts the value, specified as an argument, to a value of date type.

Syntax

 Copy Code

DateTime CDate (
    object value
)

Parameters

value
Any date expression or a string expression recognizable as a date or time.

Return Value

A DateTime value.

Remarks

Use the IsDate function to determine if value can be converted to a date. CDate recognizes date literals and time literals as well as some numbers that fall within the range of acceptable dates.

CDate recognizes date formats according to the locale setting of your system. The correct order of day, month, and year may not be determined if it is provided in a format other than one of the recognized date settings. In addition, a long date format is not recognized if it also contains the day-of-the-week string.

See Also

Conversion Functions
Date & Time Functions
DateAdd Function
DatePart Function