# Setting Popup Calendar to current datetime

**URL:** <https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211>\
**Category:** Ignition\
**Created:** [August 11, 2018, 11:59am UTC](https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211 "2018-08-11T11:59:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [August 11, 2018, 11:59am UTC](https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211/1 "2018-08-11T11:59:20Z")

</div>

Is there a way to use a expression or scripting to set the calenders current date and time when the window opens?

---

<div class="post-metadata">

**Author:** ![jshaffer09](https://avatars.discourse-cdn.com/v4/letter/j/df788c/32.png) [@jshaffer09](https://forum.inductiveautomation.com/u/jshaffer09)\
**Post date:** [August 11, 2018, 12:18pm UTC](https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211/2 "2018-08-11T12:18:13Z")

</div>

I found the solution. I used this expression for the date binding.

now() //returns the current time, updates every second.

---

<div class="post-metadata">

**Author:** ![Paullys50](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paullys50/32/3324_2.png) [@Paullys50](https://forum.inductiveautomation.com/u/Paullys50)\
**Post date:** [August 11, 2018, 3:36pm UTC](https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211/3 "2018-08-11T15:36:39Z")

</div>

Another approach, if you prefer not to constantly be updating like now() in an expression. Use a SQL Query, set the polling mode to “off”, then it will update when the screen is opened. You may also want to add some time to give the user a buffer while the window is open.

```auto
SELECT DATEADD(hour, 1, GETDATE())

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 11, 2018, 3:52pm UTC](https://forum.inductiveautomation.com/t/setting-popup-calendar-to-current-datetime/19211/4 "2018-08-11T15:52:24Z")

</div>

Or just use `now(0)`, which doesn’t update by itself.
