# Date attribute on POCO for new .NET client not available

**URL:** <https://discuss.elastic.co/t/date-attribute-on-poco-for-new-net-client-not-available/352653>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [February 6, 2024, 4:02pm UTC](https://discuss.elastic.co/t/date-attribute-on-poco-for-new-net-client-not-available/352653 "2024-02-06T16:02:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)\
**Post date:** [February 6, 2024, 4:02pm UTC](https://discuss.elastic.co/t/date-attribute-on-poco-for-new-net-client-not-available/352653/1 "2024-02-06T16:02:18Z")

</div>

Hi, I hope this is the correct category. I am updating my client from NEST to the latest Elastic.Elasticsearch.Client.

With nest I was able to add an attribute to my POCO class as below...  
[Date(Format = "date\_time\_no\_millis")]  
public DateTime Date { get; set; }

However this is unavailable in the latest client. What is the current best practise approach to achieve the same?

Thanks,

---

<div class="post-metadata">

**Author:** ![kk123](https://avatars.discourse-cdn.com/v4/letter/k/e56c9b/32.png) [@kk123](https://discuss.elastic.co/u/kk123)\
**Post date:** [February 8, 2024, 9:21am UTC](https://discuss.elastic.co/t/date-attribute-on-poco-for-new-net-client-not-available/352653/2 "2024-02-08T09:21:29Z")

</div>

Does the new default serializer achieve this by default?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 7, 2024, 9:21am UTC](https://discuss.elastic.co/t/date-attribute-on-poco-for-new-net-client-not-available/352653/3 "2024-03-07T09:21:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
