|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Date compare and put priority
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 |
|
#2
|
|||
|
|||
|
What do you mean with 30/02/08 (absurd date) ???!!!
|
|
#3
|
|||
|
|||
|
Quote:
Is only an example. Can be 02.03.2008. Isn't works because i have text fields, but i have no other choice. |
|
#4
|
|||
|
|||
|
OK, here it is.
Look at "DemoDateCompareA2000.mdb" (attachment). Look at table, Query1, (update qry). Run query, and look at table. |
|
#5
|
|||
|
|||
|
Thank you. It's works.
Dan |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Date compare and put priority |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|