# Nest.Time Casting Error

**URL:** <https://discuss.elastic.co/t/nest-time-casting-error/330364>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [April 20, 2023, 8:21am UTC](https://discuss.elastic.co/t/nest-time-casting-error/330364 "2023-04-20T08:21:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LhamoDev](https://avatars.discourse-cdn.com/v4/letter/l/65b543/32.png) [@LhamoDev](https://discuss.elastic.co/u/LhamoDev)\
**Post date:** [April 20, 2023, 8:21am UTC](https://discuss.elastic.co/t/nest-time-casting-error/330364/1 "2023-04-20T08:21:59Z")

</div>

Hi  
With the new Nest upgrade to 7.17,  
I'm getting this error

```auto
Scroll = {"Unable to cast object of type 'System.TimeSpan' to type 'Nest.Time'

```

On

```auto
Client.Scrollall<T>(new ScrollAllRequest(_halfminute, 5) {Search = query});

```

I already changed the "\_halfminute" to a Nest.Time, but I'm still getting the error which breaks my application.  
Any suggestions?

---

<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:** [May 18, 2023, 8:22am UTC](https://discuss.elastic.co/t/nest-time-casting-error/330364/2 "2023-05-18T08:22:12Z")

</div>

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