dand_dd
04-30-2008, 12:01 AM
Hi,
I have to compare to date fields and as result i have to write into another field a priority.
I have 2 example queries but works wrong.
When F9 is less than Time1 then prio=1, When F9 is between Time1 and Time2( F9 is greater than Time1 but less than Time2) then prio=2, When F9 is between Time2 and Time3( F9 is greater than Time2 but less than Time3) then prio=3, when F9 is greater than Time3 then prio=4.
For example:
Time1 --- Time2 --- Time3 --prio -- F9
-------------------------------------------------------------
29/02/08 -- 07/03/08 -- 01/05/08-- 1 -- 28/02/08
29/02/08 -- 07/03/08 -- 01/05/08-- 2 -- 30/02/08
29/02/08 -- 07/03/08 -- 01/05/08-- 3 -- 20/03/08
29/02/08 -- 07/03/08 -- 01/05/08-- 4 -- 01/06/08
I have to compare to date fields and as result i have to write into another field a priority.
I have 2 example queries but works wrong.
When F9 is less than Time1 then prio=1, When F9 is between Time1 and Time2( F9 is greater than Time1 but less than Time2) then prio=2, When F9 is between Time2 and Time3( F9 is greater than Time2 but less than Time3) then prio=3, when F9 is greater than Time3 then prio=4.
For example:
Time1 --- Time2 --- Time3 --prio -- F9
-------------------------------------------------------------
29/02/08 -- 07/03/08 -- 01/05/08-- 1 -- 28/02/08
29/02/08 -- 07/03/08 -- 01/05/08-- 2 -- 30/02/08
29/02/08 -- 07/03/08 -- 01/05/08-- 3 -- 20/03/08
29/02/08 -- 07/03/08 -- 01/05/08-- 4 -- 01/06/08