# Date range slider error

**URL:** <https://forum.inductiveautomation.com/t/date-range-slider-error/6577>\
**Category:** Ignition\
**Created:** [May 24, 2013, 7:48pm UTC](https://forum.inductiveautomation.com/t/date-range-slider-error/6577 "2013-05-24T19:48:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AJBerera](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AJBerera](https://forum.inductiveautomation.com/u/AJBerera)\
**Post date:** [May 24, 2013, 7:48pm UTC](https://forum.inductiveautomation.com/t/date-range-slider-error/6577/1 "2013-05-24T19:48:31Z")

</div>

I am trying to set a range on this component using strings I have for the current date {date} and a string that represents a time.

Start date is bound to the expression:

```auto
toDate({Root Container.Date} + right({Root Container.Start},8))
```

where a string (Date):

```auto
dateFormat(now(),"MM/dd/yyyy ")
```

and a string (Start):

```auto
SELECT Starttime FROM Shifts WHERE Shiftname = '{Root Container.GroupName.selectedStringValue}'
```

I keep getting errors that look like:

Exception: Error executing expression binding on  
ShiftReport.Root Container.Date Range.startDate  
caused by ExpressionException: Unable to cast value: ‘05/24/2013 09:00 AM’ to a(n) Date. Try using a failover parameter in your cast function.

Ignition v7.6.0 (b1875)  
Java: Sun Microsystems Inc. 1.6.0\_45

Can someone point out my mis step?

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 24, 2013, 8:40pm UTC](https://forum.inductiveautomation.com/t/date-range-slider-error/6577/2 "2013-05-24T20:40:58Z")

</div>

Try formatting your date like so: yyyy-MM-dd HH:mm:ss - the toDate() expression should be able to parse that correctly.
