Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scanning for month= in date field
Message
De
26/08/1999 10:13:45
 
 
À
26/08/1999 09:47:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00257868
Message ID:
00257895
Vues:
17
>I'm trying to scan a date field for records that are in the month of may 1999 is there a function or comgination of functions to do this?
>

several ways to do this - I'd use BETWEEN(), as in:

dBeginDate = {^1999-06-01}
dEndDate = GOMONTH(dBeginDate,1) - 1

SCAN FOR BETWEEN(dMyDateFld, dBeginDate, dEndDate)

an index on dMyDateFld will help performance significantly here.

You could also use DTOS():

cMonthToFind = LEFT(DTOS(dBeginDate),6)

SCAN FOR DTOS(dMyDateFld) = cMonthToFind

an index on DTOS(dMyDateFld) will help performance significantly here.
>Any Help will be greatly appreciated!
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