Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 30th, 2008, 02:02 AM
dand_dd dand_dd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 21 dand_dd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 38 m 56 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old April 30th, 2008, 03:30 AM
MStef MStef is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Location: Zagreb - Croatia
Posts: 84 MStef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 13 h 35 m
Reputation Power: 3
What do you mean with 30/02/08 (absurd date) ???!!!

Reply With Quote
  #3  
Old April 30th, 2008, 03:37 AM
dand_dd dand_dd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 21 dand_dd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 38 m 56 sec
Reputation Power: 0
Quote:
Originally Posted by MStef
What do you mean with 30/02/08 (absurd date) ???!!!


Is only an example. Can be 02.03.2008. Isn't works because i have text fields, but i have no other choice.

Reply With Quote
  #4  
Old April 30th, 2008, 04:18 AM
MStef MStef is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Location: Zagreb - Croatia
Posts: 84 MStef User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 13 h 35 m
Reputation Power: 3
OK, here it is.
Look at "DemoDateCompareA2000.mdb" (attachment).
Look at table, Query1, (update qry).
Run query, and look at table.
Comments on this post
dand_dd agrees: very good solution
Attached Files
File Type: zip DemoDateCompareA2000.zip (8.2 KB, 34 views)

Reply With Quote
  #5  
Old April 30th, 2008, 04:51 AM
dand_dd dand_dd is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 21 dand_dd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 38 m 56 sec
Reputation Power: 0
Thank you. It's works.

Dan

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Date compare and put priority


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway