EPTXmlTextParserGetAsDateTime Method Content Studio 5.7 SDK
Content Studio Web Content Management System

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

Returns the value as a DateTime of a specified Content Studio EPT field.

Namespace: ContentStudio.Document.EPT
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public DateTime GetAsDateTime(
	string fieldName
)

Parameters

fieldName
Type: SystemString
The name of the field. This name cannot be null.

Return Value

Type: DateTime
The value of the field if found, MinValue if the field does not exist.
Exceptions

ExceptionCondition
ArgumentNullExceptionThe argument FieldName cannot be null.
FormatExceptionThe value does not contain a valid string representation of a date and time.
Remarks

The string s is parsed using the formatting information in a DateTimeFormatInfo initialized for the current culture. It ignores unrecognized data if possible and fills in missing month, day, and year information with the current time. If s contains only a date and no time, this method assumes 12:00 midnight. Any leading, inner, or trailing white space character in s is ignored. The date and time can be bracketed with a pair of leading and trailing NUMBER SIGN characters ('#', U+0023), and can be trailed with one or more NULL characters (U+0000).
This remark is an excerpt from the MSDN documentation.
See Also

Reference