# Expression Binding to get Week of Year

**URL:** <https://forum.inductiveautomation.com/t/expression-binding-to-get-week-of-year/80524>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 16, 2023, 10:33am UTC](https://forum.inductiveautomation.com/t/expression-binding-to-get-week-of-year/80524 "2023-10-16T10:33:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [October 16, 2023, 10:54am UTC](https://forum.inductiveautomation.com/t/expression-binding-to-get-week-of-year/80524/2 "2023-10-16T10:54:33Z")

</div>

```python
dateExtract({../DateTimePicker.props.value}, 'week')

```

May not be ISO, however.

This would give an ISO week of year

> [@How to extract WEEK\_OF\_YEAR from java.util.date?](https://forum.inductiveautomation.com/t/how-to-extract-week-of-year-from-java-util-date/50310/13):
>
> java.time was added to overcome the inconsistency of Calendar. from java.time import ZoneId from java.time.temporal import IsoFields now = system.date.now() date = now.toInstant().atZone(ZoneId.systemDefault()).toLocalDate() week = date.get(IsoFields.WEEK\_OF\_WEEK\_BASED\_YEAR) print now print date print week

---

_[View the full topic](https://forum.inductiveautomation.com/t/expression-binding-to-get-week-of-year/80524)._
