Click or drag to resize

TToD Function

X#
Returns a Date value from a DateTime expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION TToD(
	tExpression AS DateTime
) AS DATE
Request Example View Source

Parameters

tExpression
Type: DateTime
Specifies a date and time expression from which TToD( ) returns a Date value. tExpression must evaluate to a valid DateTime. If tExpression contains only a time, X# adds the default date of 12/30/1899 to tExpression and returns this default date.

Return Value

Type: Date
Date
Examples
X#
1STORE DateTime( ) TO gtDtime  // Creates a Datetime type memory variable
2CLEAR
3? "gtDtime is type: "
4?? Type('gtDtime')  // Displays T, Datetime type value
5gtDtime = TToD(gtDtime)     //  Converts gtDtime to a date value
6? "gtDtime is now type: "
7?? Type('gtDtime')  // Displays D, character type value
See Also