Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I'm doing something wrong with a date calc
Message
De
28/03/2007 19:47:18
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01209516
Message ID:
01209523
Vues:
15
>>>Hi Grady,
>>>
>>>It's hard to tell from your code which are memory variables and which are table fields. You should either use 'm.' prefix or Hungarian notation for memore variables to make code readable and avoid conflict between memory variables and table fields.
>>>
>>>>I have a file that has map coords in it. It loads and places shapes on a map at the coords in the table. All works fine so far.
>>>>But I need to remove some of the shapes if the date in the table is less than the date calculated in this little routine. When the code runs, it removes all the shape and leaves none when it should be leaving shapes > Dday behind for viewing.
>>>>
>>
>>* I'm assuming I can use m. in front of a date
>>* DateNumber is an integer 7,14,21, or 28
>>Dday = (Date() - m.nDateNumber)
>>Scan
>>	If localcrime1.crimedate < m.Dday
>>		ShapeID = localcrime1.shapename
>>		Thisform.RemoveObject(m.ShapeID)
>>	Endif
>>Endscan
>>
>
>I removed unneeded dots, though some people like to leave them.
>
>Anyway, the code looks fine to me, can you trace it to see, what it's doing? I think you have data problem, not a bug in this little piece of code.

Thanks for the clue. BTW the Shapename field contains a sys(2015) value
I ain't skeert of nuttin eh?
Yikes! What was that?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform