home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / 8727 < prev    next >
Encoding:
Text File  |  1992-12-30  |  2.4 KB  |  64 lines

  1. Newsgroups: comp.databases
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!dell32.ortta.umn.edu!durai
  3. From: durai@ortta.umn.edu (Durai Venkatasubramanian)
  4. Subject: Pls help: algorithm wanted (xbase, pref foxpro)
  5. Message-ID: <durai.102.725742702@ortta.umn.edu>
  6. Lines: 51
  7. Sender: news@news2.cis.umn.edu (Usenet News Administration)
  8. Nntp-Posting-Host: dell32.ortta.umn.edu
  9. Organization: U of Mn
  10. Date: Wed, 30 Dec 1992 19:11:42 GMT
  11. Lines: 51
  12.  
  13. I need an algorithm to accomplish a date comparison task.  Any help will be 
  14. appreciated and gratefully remembered for life.
  15.  
  16. I have an application that keeps track of subcontracts issued to outsiders.  
  17. For every subcontract, we have to receive various rate agreements.  The 
  18. subcontracts we issue usually span across multi years, but the rate 
  19. agreement we receive is always for one year, and renewed every year for the 
  20. duration of the contract.  The rate agreements can be provisional or 
  21. final.  We should at least have a provisional agreement on file, in order 
  22. to issue subcontract.  The rate agreement can be according the vendor's 
  23. fiscal year.
  24.  
  25. When the user enters the subcontract start and end dates, the system has to 
  26. check the available rate agreements for the period, and summarize how the 
  27. various rate agreements cover the subcontract.
  28.  
  29. For example, I have a subcontract for the period 01/01/92 - 12/31/94 (3 
  30. years).  I have the following rate agreements:
  31.  
  32. Final  07/01/91 - 06/30/92
  33. Final  07/01/92 - 06/30/93
  34. Provl  07/01/93 - 12/31/93
  35. Final  01/01/94 - 06/30/94    
  36.     
  37. The coverage report should look as follows:
  38.  
  39. Subcontract Period: 01/01/92 - 12/31/94
  40.  
  41. How Covered ?  
  42.  
  43. 01/01/92 - 06/30/92 Final 
  44. 07/01/92 - 06/30/93 Final
  45. 07/01/93 - 12/31/93 Provl
  46. 01/01/94 - 06/30/94 Final
  47. 07/01/94 - 12/31/94 Uncovered
  48.  
  49.  
  50. My problem:
  51.  
  52. I have all the individual agreements on a database.  When the user enters a 
  53. new subcontract, the system compares the contract period with the agreement 
  54. period to establish coverage or otherwise.  I am using foxpro, and a command 
  55. line like "for between(contractdate, agreement_start_date, 
  56. agreement_end_date)" or "for between(agreement_end_date, 
  57. contract_start_date, contract_end_date)".  I am not getting the desired 
  58. result.  How do I properly tabulate the results of the comparison ?  What am 
  59. I doing wrong ?  
  60.  
  61. I apologize if I am asking too much.  If someone has a solution for similar 
  62. problem, and is willing to share, I will be very thankful.
  63.  
  64.