Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wich Birthdays for two given dates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00363237
Message ID:
00363294
Vues:
20
>Hi John & George,
>
>It could be easily done.
>
>First assumption: year(dend)-year(dstart)<=1 (within the same year, or, say,
>
>8/11/99 to 5/5/00
>
>Otherwise, all clients with not empty(DOB) quilified.
>
>Let's assume for simplicity (otherwise there could be leap year issue,
>which could be resolved more clever...), that year(dend)=year(dstart)
>
>
>local lnYear
>lnYear=year(dstart)
>SELECT * FROM clients ;
>   WHERE between(ctod(str(month(clients.dob),2)+'/'+str(day(clients.dob),2)+'/'+str(lnYear,4)) ,dstart, dend)
>* Note - better use strict date format and restore date respectively, but I just don't remember this format...
>

This works too, I just didn't give the my original too much thought
lnyear = YEAR(DATE())
SELECT *;
  FROM CLIENTS;
  WHERE BETWEEN(DATE(lnyear, MONTH(clients.dob), DAY(clients.dob)), dstart, dend)
Empty birthdates shouldn't be allowed.< g >
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform