Hi, I know that syntax with week( today(),'DD-MM-YYYY') is wrong.
I have discover this in some apps handover to me and noticed that this is have a huge impact of indexing of qvd files where this week calculation is used in naming conventions. i.e.: store table into file_$(vWeek)_$(vYear).qvd(qvd);
The most odd thing is that - this syntax week( today(),'DD-MM-YYYY') is not returning any error, - it is returning different value for 15-17.02.2021. value is 8 - while on 18-19.02.2021 value is 9
I have discovered this when I have been asked to force reload and loading app referring to load * file_$(vWeek)_$(vYear).qvd(qvd) failed, I have debug variables and noticed that on Friday 19.02.2021
application was trying load the file with the name file_9_2021.qvd(qvd)
Can someone who is more advanced than me explain me why the syntax is working but showing wrong week number?
The interesting behaviur is that week number is +2 for Friday and Thursday but +1 for Mon-Wed Is it kind of managing BrokenWeeks ?
I have found this in one of my client and have no idea why it was used in such way for indexing week snapshots ,do you have any idea? I think this is really bad approach as the manual reload on Friday or Thursday could casue the issue with generating snapshot file under wrong week number.