Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Algorithm for missing dates.
Message
De
30/07/2009 18:51:34
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01415572
Message ID:
01415580
Vues:
73
Guess I didn't explain well or ask the question right. Getting the dates to/from SQL was the easy part. The hard part is converting it all to a string that properly adds periods for the missing(holiday and weekend) dates.

Your solution would give me a cursor that includes missing dates... halfway there. Walking that cursor could work, but I have to solve another issue with skipping/ignoring completely empty weeks.



>>I have a bunch of single letter codes for each date that I'm trying to string together, however the data may be missing dates for weekends and holidays. The result should look something like "ABBAC..CB.AA..BBAB....BACA"
>>
>>I can put the date, week, day of week, and letter code into an array with an SQL statement and walk the array - adding the weekend breaks seems easy, but I'm having difficulty with missing dates during the week. Can anyone help me with an algorithm or faster way to do this?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform