[This is preliminary documentation and is subject to change.]
Gets the current node's value as an DateTime.
Namespace: Tools.XmlT.XPathTAssembly: 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
| Exception | Condition |
|---|---|
| System..::..FormatException | The current node's string value cannot be converted to a DateTime. |
| System..::..InvalidCastException | The attempted cast to DateTime is not valid. |