2022 Oct 13 12:17 PM
Hi Experts,
Previously I asked for a way to derive Year and Week number respecting the following specifications:
Here is an example screen:
I was advised to use the following method and it works: (Number of week in 'v_week' variable)
Now I need a way to calculate the data (YYYYMMDD) starting from Year and Week (YYYYWW) respecting the same specifications above
Thanks
Francesco
2022 Oct 13 3:12 PM
You may just want to create a custom table with Year, Week & date of first & last date of the week for next 100 years (you may write a script for that). There will be about 5200 - 5300 records in it. This will help with performance if you are using CDS views and want to use it in a JOIN.
2022 Oct 13 1:15 PM
If you know which day of the week is January 1st, as a number between 1 and 7 (not sure in your case which number is Sunday), then you can determine how many days are to be added to reach Sunday. Can't you? Is there any problem.
2022 Oct 13 1:39 PM
from 2021.02 (YYYY.WW) Wednesday I need to calculate what date corresponds, for example 13.01.2021 (DD.MM.YYYY)
How can I do it?
2022 Oct 13 3:04 PM
2022 Oct 13 3:12 PM
You may just want to create a custom table with Year, Week & date of first & last date of the week for next 100 years (you may write a script for that). There will be about 5200 - 5300 records in it. This will help with performance if you are using CDS views and want to use it in a JOIN.
2022 Oct 13 5:59 PM
So you know that first week in the year (2021.01) starts on 06.01.2021.
Week 2021.02 starts on 13.01.2021.
Week 2021.03 starts on 20.01.2021.
I think that frdric.girod won the price!