Plumtree EDK (Enterprise Web Development Kit) 5.4.0 |

# ISearchResult.GetFieldAsDate Method

Gets the value of the specified `Field` as a `DateTime`.

DateTime GetFieldAsDate(
Field field
);

#### Parameters

field
  `Field` to evaluate

#### Return Value

DateTime value of field

#### Remarks

Note that `DateTime`s in the search server are only accurate to four minutes, as the `double` used to store dates in the portal is converted to `float`.

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentException | if the field is not present in this ISearchResult
InvalidCastException | if the value of the field is not of type Date or the value is null. Use `GetFieldAsObject()` to check if the value is null.

#### See Also

ISearchResult Interface | Plumtree.Remote.PRC.Search Namespace