Keywords
Formatdatetime
Type
Function-Date and Time
Example expression
= Formatdatetime (Fields! Field name. Value, dateformat. 1_date)
= Formatdatetime (Fields! Field name. Value, vb1_date)
Remarks
Returns a string expression that represents a date or time value.
The second parameter is a dateformat enumeration. The enumerated values are listed as follows --
Member name
Description
Generaldate
For real numbers, a date and time are displayed. If the number does not have a decimal part, only the date is displayed. If the number does not have an integer, only the time is displayed. The date and time display are determined by the computer's region settings. This member is equivalent to the Visual Basic constant vbgeneraldate.
Longdate
Use the long date format specified in the region settings of the computer to display the date. This member is equivalent to the Visual Basic constant vblongdate.
Longtime
Use the long-time format specified in the region settings of the computer. This member is equivalent to the Visual Basic constant vblongtime.
Expiry date
Use the short date format specified in the computer's region settings to display dates. This member is equivalent to the Visual Basic constant vb1_date.
Processing time
Use the specified short-time format display time in the computer's region settings. This member is equivalent to the Visual Basic constant vb1_time.
URL: http://msdn2.microsoft.com/zh-cn/library/microsoft.visualbasic.dateformat.aspx