Question: I am trying to create a query that yields Year, Iso week and sum of amount for that year and week.

My problem is that the way I am doing it returns the amount for the first days of 2021 as being from week 53 when it actually should of course be a part of week 53 of the year 2020.

Here is my query:

```
SELECT 
  datepart(year, [MyDate]) AS [Year],
  datepart(iso_week,[MyDate]) AS WeekNumber,
  sum([Amount]) AS TotalAmount
FROM [Temp].[dbo].[MyTable]
GROUP BY datepart(year, [MyDate]), datepart(iso_week,[MyDate])
ORDER BY datepart(year, [MyDate]), datepart(iso_week,[MyDate])

```

How can this be fixed?

Answer: 
```js
  const { sound, status } = await Audio.Sound.createAsync(
    {
      uri: `some_url`,
    },
    { shouldPlay: true },
    (status) => console.log(status.positionMilis),
  );

```

The Audio.Sound.createAsync takes a third argument which is a callback that is executed every 100ms for example (it can be changed). It is called with a status object that has everything you need. You can read more [here](https://docs.expo.dev/versions/latest/sdk/audio/#:%7E:text=Audio.Sound.createAsync(source%2C%20initialStatus%20%3D%20%7B%7D%2C%20onPlaybackStatusUpdate%20%3D%20null%2C%20downloadFirst%20%3D%20true))
```
const [duration, setDuration] = useState(0);

Audio.setOnPlaybackStatusUpdate(()=>setDuration(status.positionMilis);

playbackObject.setOnPlaybackStatusUpdate(onPlaybackStatusUpdate);

```

Sets a function to be called regularly with the AVPlaybackStatus of the playbackObject

i know this might be a month late, use setOnPlaybackStatusUpdate as stated above

[search expo documentation for setOnplaybackStatusUpdate](https://docs.expo.dev/versions/latest/sdk/av/)