[This is preliminary documentation and is subject to change.]

Gets the current node's value as an DateTime.

Namespace: Tools.XmlT.XPathT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public override DateTime ValueAsDateTime { get; }
Visual Basic
Public Overrides ReadOnly Property ValueAsDateTime As DateTime
	Get
Visual C++
public:
virtual property DateTime ValueAsDateTime {
	DateTime get () override;
}
F#
abstract ValueAsDateTime : DateTime
override ValueAsDateTime : DateTime
JScript
override function get ValueAsDateTime () : DateTime

Return Value

The current node's value as an DateTime. If ContextValue is IConvertible than ToDateTime(IFormatProvider) is used, otherwise ValueAsLong is called.

Exceptions

ExceptionCondition
System..::..FormatExceptionThe current node's string value cannot be converted to a DateTime.
System..::..InvalidCastExceptionThe attempted cast to DateTime is not valid.

See Also