# Determine Day of Week

**URL:** <https://forum.inductiveautomation.com/t/determine-day-of-week/5851>\
**Category:** Ignition\
**Created:** [February 12, 2013, 1:35pm UTC](https://forum.inductiveautomation.com/t/determine-day-of-week/5851 "2013-02-12T13:35:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [February 12, 2013, 1:35pm UTC](https://forum.inductiveautomation.com/t/determine-day-of-week/5851/1 "2013-02-12T13:35:24Z")

</div>

How can I determine the day of week as an integer and provide in an OPC tag?

---

<div class="post-metadata">

**Author:** ![Dravik](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@Dravik](https://forum.inductiveautomation.com/u/Dravik)\
**Post date:** [February 12, 2013, 2:58pm UTC](https://forum.inductiveautomation.com/t/determine-day-of-week/5851/2 "2013-02-12T14:58:58Z")

</div>

`from java.util import *
cal = Calendar.getInstance()
print(cal.get(Calendar.DAY_OF_WEEK))
`

That will print the current day as an integer. You could then do a timer gateway script to write that to an OPC tag perhaps.
