Description
Evaluates the string specified and returns only the date.
Arguments
DateTimeString is a string including a date and a Time value.
Action
Evaluates the string specified and returns only the date.
Examples
DTSToDate ("2000/01/13 11:30:15")
Returns the Date value, January 13, 2000. The month must be entered as 01 rather than just 1.
Comments
The Date value returned by DTSToDate is the date at midnight. The Time value is dropped, and midnight is established as the implied time of the date. This is only relevant when performing operations with the resulting date, such as adding a Time value.
For new formulas, use the
CDate or
DateValue functions instead of DTSToDate. The CDate and DateValue functions are able to convert more types of strings.