This function returns true if timestamp lies inside the part of the lunar week up to and including the last millisecond of base_date. Lunar weeks in QlikView are defined by counting 1 January as the first day of the week.
InLunarWeekToDate (timestamp, base_date, period_no [, first_week_day])
Return data type: Boolean
|timestamp||The date that you want to compare with base_date.|
|base_date||Date that is used to evaluate the lunar week.|
|peroid_no||The lunar week can be offset by period_no. period_no is an integer, where the value 0 indicates the lunar week which contains base_date. Negative values in period_no indicate preceding lunar weeks and positive values indicate succeeding lunar weeks.|
|week_start||An offset that may be greater than or less than zero. This changes the beginning of the year by the specified number of days and/or fractions of a day.|
|inlunarweektodate('12/01/2013', '13/01/2013', 0)||Returns
|inlunarweektodate('12/01/2013', '11/01/2013', 0)||Returns
|inlunarweektodate('12/01/2006', '05/01/2006', 1)||Returns
Add the example script to your document and run it. Then add, at least, the fields listed in the results column to a sheet in your document to see the result.
This example checks if an invoice date falls in the part of the week shifted from the value of
LOAD RecNo() as InvID, * Inline [
InLunarWeekToDate(InvDate, '07/01/2013', 4) AS InLWeek2DPlus4
Drop table TempTable;