# Find out the start date/time

**URL:** <https://forum.inductiveautomation.com/t/find-out-the-start-date-time/107303>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 12, 2025, 1:31am UTC](https://forum.inductiveautomation.com/t/find-out-the-start-date-time/107303 "2025-06-12T01:31:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anant\_Upadhyayula](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Anant\_Upadhyayula](https://forum.inductiveautomation.com/u/Anant_Upadhyayula)\
**Post date:** [June 12, 2025, 1:31am UTC](https://forum.inductiveautomation.com/t/find-out-the-start-date-time/107303/1 "2025-06-12T01:31:34Z")

</div>

I was using Value source as `Expression` and Data Type as` DateTime`. to find out for a given shift what was the start time and it was giving me error\_configuration

```python
case(
{[.]currentShift} = 1, {[.]Shift1/startTime},
{[.]currentShift} = 2, {[.]Shift2/startTime},
{[.]currentShift} = 3, {[.]Shift3/startTime},
  now()
)

```

am i missing something ? Thank you for your help

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [June 12, 2025, 1:54am UTC](https://forum.inductiveautomation.com/t/find-out-the-start-date-time/107303/2 "2025-06-12T01:54:52Z")

</div>

incorrect syntax, it should be

```python
case(
    {[.]currentShift},
    1, {[.]Shift1/startTime},
    2, {[.]Shift2/startTime},
    3, {[.]Shift3/startTime},
    now(1000)
)

```

> **[case | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/case)**
>
> This function acts like the switch statement in C-like programming languages.

---

<div class="post-metadata">

**Author:** ![Anant\_Upadhyayula](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@Anant\_Upadhyayula](https://forum.inductiveautomation.com/u/Anant_Upadhyayula)\
**Post date:** [June 12, 2025, 2:04am UTC](https://forum.inductiveautomation.com/t/find-out-the-start-date-time/107303/3 "2025-06-12T02:04:19Z")

</div>

@ryan.white Thank you, the pesky detail didn't catch it.
