---
title: "Aspose::Email::Mapi::MapiPropertyContainer::TryGetPropertyDateTime method"
url: "https://reference.aspose.com/email/cpp/aspose.email.mapi/mapipropertycontainer/trygetpropertydatetime/"
product: "Aspose.Email for C++"
description: "Gets the value of the specified property as DateTime type."
---


## TryGetPropertyDateTime {#trygetpropertydatetime}

Gets the value of the specified property as DateTime type. A return value indicates whether the operation succeeded.

**Returns:** true if s was converted successfully; otherwise, false.

```cpp
TryGetPropertyDateTime(int64_t tag, System::DateTime & value)
```

| Parameter | Description |
| --- | --- |
| tag | The MAPI property tag. |
| value | When this method returns, contains the value of the specified property, if the property exists. This parameter is passed uninitialized. |

