# aggregateWindow 1w start from monday

**URL:** https://community.influxdata.com/t/aggregatewindow-1w-start-from-monday/25095
**Category:** Fluxlang
**Created:** [May 19, 2022, 7:38am UTC](https://community.influxdata.com/t/aggregatewindow-1w-start-from-monday/25095 "2022-05-19T07:38:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sweng](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sweng](https://community.influxdata.com/u/sweng)
#### Post date: [May 19, 2022, 7:38am UTC](https://community.influxdata.com/t/aggregatewindow-1w-start-from-monday/25095/1 "2022-05-19T07:38:45Z")

</div>

Hey,

when using aggregateWindow with 1w or 7d range, new timestamps will be on thursdays as Unix epoch was on thursday. Is it possible to change this behaviour so that the created timestamps will be different, like mondays for example?

---

<div class="post-metadata">

### Author: ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)
#### Post date: [May 23, 2022, 7:22pm UTC](https://community.influxdata.com/t/aggregatewindow-1w-start-from-monday/25095/2 "2022-05-23T19:22:23Z")

</div>

Hello @sweng,  
Welcome!  
You could use the window() function and then apply your aggregation.

> **[window() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/window/#window-by-week)**
>
> window() groups records using regular time intervals.

The window() function lets you specify an offset

---

<div class="post-metadata">

### Author: ![sweng](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@sweng](https://community.influxdata.com/u/sweng)
#### Post date: [May 24, 2022, 7:54am UTC](https://community.influxdata.com/t/aggregatewindow-1w-start-from-monday/25095/3 "2022-05-24T07:54:36Z")

</div>

Thanks,

it is fixed now.
