...
Info |
---|
NOTE: If the source Datetime value does not include a valid input for this function, a missing value is returned. |
D s lang vs sql |
---|
Known Issue:
The current implementation of the WEEKNUM function returns a maximum value of 52. However, in some years, such as 2020, there is a 53rd week. You can add steps similar to the following to work around this issue:
D lang syntax | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
derive type: single value: dateformat(date(year(myDate), 1, 1), 'yyyy\/MM\/dd') as: 'NewYearsDayforMyYear' |
D lang syntax | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
derive type: single value: if(datedif(NewYearsDayforMyYear, myDate, day) > (52 * 7), 53, weeknum(myDate)) as: 'weekNumforMyDate' |
...
Info | |
---|---|
NOTE: Depending on the locale where the calculation of this function is performed, the maximum number of weeks in a year may be 52 or 53. It's possible that you could see different results in your browser,
|
D s | ||
---|---|---|
|
Column reference example:
...