Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Manipulating dates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00154553
Message ID:
00154575
Vues:
19
>Hi all,
>
>I have to create a function where I need to flag a record where the (RecordDate - 2 months) <= date(). I'm not sure how to do it. Can I just create something like an arithmetic statement to do the job??

Pretty trivial; you can add or subtract months to a date using GOMONTH, so try something like:

IF GOMONTH(dMyDateField,-2) <= DATE()

You can add days by simple arithmetic; for example, two days ago would be:

DATE()-2
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform