Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining a birthday
Message
 
 
À
22/01/2002 15:29:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00608612
Message ID:
00608616
Vues:
16
You can use MONTH() and DAY() functions
WHERE MONTH(dob) = MONTH(DATE()) AND DAY(dob) = DAY(DATE())
or
WHERE DATE( YEAR(DATE()), MONTH(dob), DAY(dob)) = DATE()   
or
WHERE dob = DATE( YEAR(dob), MONTH(DATE()), DAY(DATE()))
I would go with the last one because it could be Rushmore optimazable if you've index on dob


>Hi Folks -
>
>If I have a table which contains a contact name and date field, dob. What command would I use to filter the data down only to show the contacts with a birthday (based upon the dos clock date) of today ?
>
>Would I need to convert the month and day to character? If so is that the only way?
>
>Thanks,
>
>Larry
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform