I am using self servicing, version 4.x.
I have a table with the folowing 3 columns:
year
week
day of week
I want to do a query where a date is between 2 dates. So I need to calculate a value and compare that with 2 other values.
E.g. suppose I need everything between 01-01-2019 and 31-01-2019. This is equivalent with
year from = 2019
week from = 1
day from = 2
and
year to= 2020
week to = 1
day to = 2
In SQL the where clause would be:
WHERE ((1000 * YEAR) + (10 * Week) + Day) between 20190102 and 20200102
How can this be done in a predicate expression?